| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
| On this page… |
|---|
Use preferences to specify options for MATLAB tools, as follows:
Select File > Preferences. Alternatively,
click the Preferences button
on the desktop toolbar;
if the button is not on the toolbar, you can add it—for information,
see Setting Toolbars Preferences for Desktop Tools.
From the left pane of the Preferences dialog box, choose a tool or product and click the + to display more preferences for that item. From the expanded list, select the entry you want. The right pane shows the preferences for that item.
Change settings. Click Apply or OK to set the preferences. Preferences take effect immediately. They remain persistent across sessions of MATLAB.
Note that some tools allow you to control these settings from within the tool without setting a preference. Use that method if you want the change to apply only to the current session.
Open the Preferences dialog box using the preferences function.
Preference | What You Can Specify |
|---|---|
Toolbox path caching, figure window printing, delete function behavior, MAT-file save formats, confirmation dialogs, and source control. | |
Tab completion, function hints, and delimiter matching for the Command Window and Editor. Keyboard shortcuts for desktop tools. | |
Font type, style, and size for desktop tools. Customize for any tool. | |
Colors for text, background, syntax highlighting for M-files, and hyperlinks in desktop tools. | |
| Show or hide M-Lint messages in the Editor M-Lint automatic code analyzer and in the M-Lint Code Check Report. | |
| Remove, add, and rearrange controls on toolbars for desktop tools. | |
Numeric format and display, accessibility, and tab size. | |
Display, filtering, and saving. | |
Editor type, startup options, display, tab size and indenting, language (including syntax highlighting colors for all files other than MATLAB files), code folding, and autosave. | |
Product filter, help on selection window, and PDF reader for Linux platforms. | |
Internet proxy server settings. | |
Number of entries in history and refresh options. | |
Numeric format, use of Enter key, and decimal separator. | |
| Statistical calculation options. | |
Display options for GUI-building tool. | |
Time Series Tools | Property Editor dialog and x-axes warning dialog. For details, click the Help button in the Preferences dialog box. |
Application, text, line, uicontrols, axis, format, background color, and size. | |
Other products | Preferences for other installed MathWorks products. |
MATLAB and other MathWorks products store their preferences in the file matlab.prf. Type prefdir in the Command Window to see the full path for the folder where matlab.prf is located, called the preferences folder. The preference folder also contains other related files.
On Apple Macintosh platforms, the folder might be in a hidden folder, for example, myname/.matlab/R2009b. To access the folder, select Go > Go to Folder in the Apple Mac OS® Finder tool. In the resulting dialog box, type the path returned by prefdir and press Enter.
The matlab.prf file loads when you start MATLAB. When you make changes to preferences while using MATLAB, it makes the changes to matlab.prf. When you closeMATLAB, it saves those changes to matlab.prf.
The exact name of the preferences folder that MATLAB uses depends on the release. After you install a new version of MATLAB and start MATLAB, it tries to use your existing preferences from the previous version, where possible. For more information on the preference folder name and the preference migration process, see the prefdir reference page.
![]() | Other Desktop Features | Setting General Preferences for the MATLAB Application | ![]() |

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 |