rats
Rational output.
📝Syntax
S = rats(X)
S = rats(X, len)
📥Input Arguments
Parameter Description
X Input array: real or complex, scalar, vector or matrix (single or double).
len Field width: scalar. The default is 13.
📤Output Arguments
Parameter Description
S Character array of rational approximations.
📄Description

S = rats(X) uses rat to display rational approximations to the elements of X in a fixed width field.

The string length for each element is len + 1 to account for the slash '/' character inserted between the numerator and the denominator. Asterisks are used for elements which can not be printed in the allotted space.

💡Examples
S = rats(1 ./ (1:5))
🔗See Also
ratformat
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub