S = rats(X)
S = rats(X, len)
| Parameter | Description |
|---|---|
| X | Input array: real or complex, scalar, vector or matrix (single or double). |
| len | Field width: scalar. The default is 13. |
| Parameter | Description |
|---|---|
| S | Character array of rational approximations. |
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.
S = rats(1 ./ (1:5))
| Version | Description |
|---|---|
| 2.0.0 | initial version |