Select the Command Window
The Command Window enables you to enter individual statements at the command line and view the generated results.
The Command Window is always open. To restore the Command Window to the default location, go to the Home tab, and in the Environment section, click Layout. Then, select from one of the default layout options.
To bring focus to the Command Window from another tool such as the Editor, type
Create a line plot and then bring focus back to the Command Window.
x = 0:pi/100:2*pi; y = sin(x); plot(x,y)
commandwindow selects the MATLAB® Command Window. For example, type
after a plotting command to bring focus back to the Command Window.
commandwindow is not supported when running MATLAB with the
To determine the number of columns and rows that display in the Command Window given
its current size, type
matlab.desktop.commandwindow.size in the
Command Window. MATLAB returns the number of columns and rows, respectively. For
ans = 133 24
The number of columns is based on the width of the Command Window. If the Set matrix width to eighty columns Command Window preference is selected, the number of columns is always 80. For more information, see Set Command Window Preferences.