display

Display text and numeric expressions

Syntax

display(X)

Description

display(X) prints the value of X. MATLAB® implicitly calls display after any variable or expression that is not terminated by a semicolon.

To customize the display of objects, overload the disp function instead of the display function. display calls disp.

Examples

Display a Matrix

X = magic(3);
display(X)
X =

     8     1     6
     3     5     7
     4     9     2

Input Arguments

expand all

X — Input valuevariable | expression

Input value, specified as a variable or expression.

See Also

| |

Was this topic helpful?