MATLAB Function Reference
  Go to function:
    Search    Help Desk 
disp    Examples   See Also

Display text or array

Syntax

Description

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.

Examples

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

which results in

See Also

format  Control the output display format

int2str  Integer to string conversion

num2str  Number to string conversion

rats  Rational fraction approximation

sprintf  Write formatted data to a string




[ Previous | Help Desk | Next ]