| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
| On this page… |
|---|
To set preferences for the Command Window, select File > Preferences and then select Command Window in the left pane of the Preferences dialog box.

Specify the format, that is, how output appears in the Command Window.
Numeric format. Specify the output format of numeric values displayed in the Command Window. This affects only how numbers are displayed, not how the MATLAB software computes or saves them. The format reference page includes the list of available formats, with examples.
Numeric display. Specify spacing of output in the Command Window. To suppress blank lines, use compact. To display blank lines, use loose. For more information, see the reference page for format.
Wrap lines. Select to make a single line of input or output in the Command Window break into multiple lines in order to fit within the current width of the Command Window. This is useful for console mode. With this option selected, an entire line is visible without scrolling, and the horizontal scroll bar does not appear because it is not needed. With this option cleared, use the horizontal scroll bar to view the entire contents of the line.
Set matrix display width to eighty columns. When selected, MATLAB displays 80 characters of matrix output in a single row, and then continues displaying output in a new row, regardless of the width of the Command Window. Use the horizontal scroll bar if the width of the Command Window is less than 80 characters.
With the check box cleared, a row of matrix output fills the width of the Command Window, and then continues displaying output in a new row. Note that if the Wrap lines preference is also selected, and the width of the Command Window is less than 80 characters, each row of 80 characters of matrix output wraps to fit within the width of the Command Window.
To determine the number of characters and lines that will display in the Command Window, given its current size, use
get(0,'CommandWindowSize')
When the matrix display width preference is not selected, the number of characters for the width is based on the current width of the Command Window. For example, a result of 50, 25 means 50 characters will display across the Command Window, and 25 lines will display. However, with the preference selected, the result for that same size Command Window is 80, 25.
Show getting started message bar. The message bar in the Command Window includes links to a video, demos, and information on getting started with MATLAB. If you want to remove the message bar in the Command Window, click the Close box in the right corner of the bar. If you close the message bar, you can still access the documentation and demos it linked to—for more information, see Help, Demos, and Related Resources.
If you closed the message bar and want to show it again, select the Show getting started message bar check box in the Command Window Display preferences.

Show Function Browser button.
The Function Browser
button
appears to the left of
the prompt in the Command Window. You use it to access the Function
Browser. If you do not want the button to appear because of the space
it requires, you can hide it by clearing the Show Function
Browser button check box. When the button is not shown,
you can access the Function Browser by pressing Shift+F1 or
by right-clicking in the Command Window and selecting Function
Browser from the context menu. For more information
about the Function Browser, see Finding Functions Using the Function Browser.
Number of lines in command window scroll buffer. Set the number of lines maintained in the Command Window, from 1,000 to 25,000. This is the number of lines you can see when you scroll vertically. A larger buffer means you can view more lines and it provides a larger base for search features, but requires more memory.
This preference setting does not impact the number of lines you can recall when you use the up arrow key in the Command Window (unless you have changed the keyboard shortcut for the up arrow key). By default, you can use the up arrow key, to recall all lines shown in the Command History window, regardless of how many lines you can see in the Command Window.
Click the Keyboard Shortcuts link to assign keyboard shortcuts to the Cursor Up and Cursor Down actions in the Command Window. These actions enable you to move the cursor in the lines above the command line prompt without using the mouse. For more information, see Customizing Keyboard Shortcuts. For information about using Command Window keyboard shortcuts and JAWS software, see Command Output Not Read.
Tab size. Number of spaces assigned to a tab stop when displaying output. The default is four spaces, except on UNIX[1] platforms where the default is eight spaces. This does not apply when the tab completion preference is selected.
[1] UNIX is a registered trademark of The Open Group in the United States and other countries.
![]() | Finding Text in the Command Window | Using the Command History Window | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |