FUNCTION REFERENCE
rats
Rational approximation as fixed-width text.
Rational approximation as fixed-width text.
Syntax
S = rats(X)Syntax
S = rats(X, strlen)Each element becomes N/D (or N when D is 1), centred in a field of strlen+1
characters (strlen is 13 by default); a row of X is one row of text. The
tolerance is 1e-6*norm(X(:),1). An element that does not fit prints as *.
Example
rats(0.75) % ' 3/4 'Differences from MATLAB: real input only. Widths other than the default and the * rule
are not checked yet.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.