I would like to see a LabVIEW implementation of the Matlab function which approximates a floating point number to a ratio of two integers, within a given tolerance.
From Matlab help:
RAT Rational approximation.
[N,D] = RAT(X,tol) returns two integer matrices so that N./D
is close to X 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.
S = RAT(X) or RAT(X,tol) returns the continued fraction
representation as a string.
Some discussion and example code of how to implement in LabVIEW is here: http://forums.ni.com/ni/board/message?board.id=170&thread.id=18012&view=by_date_ascending&page=2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea that has received less than 5 kudos within 5 years after posting will be automatically declined.