Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

Specifying Options for MATLAB Using Preferences

Setting Preferences for MATLAB

Use preferences to specify options for MATLAB tools, as follows:

  1. 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.

  2. 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.

  3. 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.

Function Alternative

Open the Preferences dialog box using the preferences function.

Summary of Preferences

Preference

What You Can Specify

General Preferences

Toolbox path caching, figure window printing, delete function behavior, MAT-file save formats, confirmation dialogs, and source control.

Keyboard

Tab completion, function hints, and delimiter matching for the Command Window and Editor. Keyboard shortcuts for desktop tools.

Fonts

Font type, style, and size for desktop tools. Customize for any tool.

Colors

Colors for text, background, syntax highlighting for M-files, and hyperlinks in desktop tools.

M-Lint

Show or hide M-Lint messages in the Editor M-Lint automatic code analyzer and in the M-Lint Code Check Report.

Toolbars

Remove, add, and rearrange controls on toolbars for desktop tools.

Command Window

Numeric format and display, accessibility, and tab size.

Command History

Display, filtering, and saving.

Editor/Debugger

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.

Help

Product filter, help on selection window, and PDF reader for Linux platforms.

Web

Internet proxy server settings.

Current Folder

Number of entries in history and refresh options.

Variable Editor

Numeric format, use of Enter key, and decimal separator.

Workspace

Statistical calculation options.

GUIDE

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.

Figure Copy Template

Application, text, line, uicontrols, axis, format, background color, and size.

Other products

Preferences for other installed MathWorks products.

Preferences File — matlab.prf

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.

  


Recommended Products

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