MATLAB Function Reference Previous page   Next Page

Display text or array



disp(X) displays an array, without printing the array name. If X contains a text string, the string is displayed.

Another way to display an array on the screen is to type its name, but this prints a leading "X =," which is not always desirable.

Note that disp does not display empty arrays.


One use of disp in an M-file is to display a matrix with column labels:

which results in

See Also

format, int2str, num2str, rats, sprintf

Previous page  dir (ftp) display Next page

© 1994-2005 The MathWorks, Inc.