disp

Prints the value of x to the application's Command window.

Syntax

disp(x)

Inputs

x
Type: Any data type.

Examples

Display a string:
disp('This is an example')
This is an example
Display a string and a matrix:
m = rand(4);
disp('Display the matrix m: '), disp (m)
Display the matrix m:
[Matrix] 4 x 4
0.96366  0.27266  0.38344  0.47767
0.79173  0.81217  0.52889  0.47998
0.56804  0.39278  0.92560  0.83608
0.07104  0.33740  0.08713  0.64817