Development Environment |
 |
Preferences for the Command Window
Using preferences, you can specify the format for how numeric values are displayed, set echoing on automatically for each session, specify the font type, style, and size, and set the colors used for syntax highlighting for contents of the Command Window.
To set preferences for the Command Window, select Preferences from the File menu in the Command Window. The Preferences dialog box opens showing Command Window Preferences.

Text Display and Display Preferences for the Command Window
Text display. Specify how output appears in the Command Window:
- Numeric format - Output format of numeric values displayed in the Command Window. This affects only how numbers are displayed, not how MATLAB computes or saves them. The
format
reference page includes the list of available formats.
- Numeric display - 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
.
- Spaces per tab - Number of spaces assigned to a tab stop when displaying output. The default is 4.
Display. Specify echoing option and buffer size:
- Echo on - Check the box if you want commands running in M-files to display in the Command Window during the M-file execution. For more information, see the reference page for
echo
.
- Limit matrix display width to eighty columns - Check the box if you want MATLAB to display only 80 columns of matrix output, regardless of the width of the Command Window. Uncheck the box if you make the Command Window wider than 80 columns and want matrix output to fill the width of the Command Window.
- Enable up to n tab completions - Check the box if you want to use tab completion when typing functions in the Command Window. Then enter a limit in the edit box. For example, if you enter 10, when you use the tab completion feature, MATLAB displays the list of possible completions if there are 10 or less. If there are more than 10, MATLAB displays a message stating there are more than 10 completions.
Uncheck the box if you do not want to use the tab completion feature. MATLAB moves the cursor to the next tab stop when you press the tab key, rather than completing a function.
- Command session scroll buffer size - Set the size of the buffer that maintains a list of previously run commands to be used for command recall. See Recalling Previous Lines for more information.
Font & Colors Preferences for the Command Window
Font. Command Window font preferences specify the characteristics of the font used in the Command Window. Select Use desktop font if you want the font in the Command Window to be the same as that specified for General Font & Colors preferences. If you want the Command Window font to be different, select Use custom font and specify the font characteristics for the Command Window:
- Type, for example, Sans Serif
- Style, for example, bold
- Size in points, for example, 12 points
After you make a selection, the Sample area shows how the font will look.
Colors. Specify the colors used in the Command Window:
- Text color - The color of nonspecial text; special text uses colors specified for Syntax highlighting
- Background color - The color of background in the window
- Syntax highlighting - The colors to use to highlight syntax. If checked, click Set Colors to specify them. For a description of syntax highlighting, see Syntax Highlighting.
| Keeping a Session Log | | Command History |  |