Show information about variable or expression result
display(
is called by MATLAB® when a statement or expression is not terminated by a semicolon. Omit the terminating semicolon from a statement or expression when you want to see an intermediate result. X
)
MATLAB calls the display
function to show information about an intermediate result, such as the values, size, type, and variable name.
To show the value of a variable or to show program output in the command window, use the disp
function.
To customize the display of user-defined objects, use the techniques described in the Customize Object Display for Classes topic.
ans
| disp
| fprintf
| matlab.mixin.CustomDisplay
| sprintf