Scilab Function

rat - Floating point rational approximation

Calling Sequence

[N,D]=rat(x [,tol])
y=rat(x [,tol])

Parameters

Description

[N,D] = rat(x,tol) returns two integer matrices so that N./D is close tox in the sense that abs(N./D - X) <= tol*abs(x). The rational approximations are generated by truncating continued fraction expansions. tol = 1.e-6*norm(X,1) is the default. y = rat(x,tol) return the quotient N./D

Examples

See Also