Getting Started    

The format Command

The format command controls the numeric format of the values displayed by MATLAB. The command affects only how numbers are displayed, not how MATLAB computes or saves them. Here are the different formats, together with the resulting output produced from a vector x with components of different magnitudes.

If the largest element of a matrix is larger than 103 or smaller than 10-3,
MATLAB applies a common scale factor for the short and long formats.

In addition to the format commands shown above

suppresses many of the blank lines that appear in the output. This lets you view more information on a screen or window. If you want more control over the output format, use the sprintf and fprintf functions.


 Controlling Command Window Input and Output Suppressing Output