Development Environment    

Setting Preferences

Set preferences to modify the default behavior of some aspects of MATLAB, such as the font used in the Command Window. These topics are covered:

Using the Preferences Dialog Box

To set preferences:

  1. Select Preferences from the File menu.
  1. The Preferences dialog box opens. The page opened reflects the currently active window.

  1. In the left pane, select a tool. In the above example, General preferences are selected, meaning the preferences apply to MATLAB in general but not to a specific tool. Click the + to display more items for that tool, and then select an item to set its preferences.
  1. The right pane shows the preference you selected.

  1. In the right pane, specify the preference values and click Apply or OK to set the preferences.
  1. The preferences take effect immediately.

Summary of Preferences

This table provides a summary; see the details for each tool.

What You Can Specify 
General Preferences
Desktop display and toolbox path caching
Command Window
Numeric format and display, echo, fonts, colors, keyboard, indenting
Command History
Display, filtering, saving, drag and drop
Editor type, startup options, fonts, colors, display, keyboard, indenting, autosaving
Documentation location, products, PDF reader location (for UNIX), synchronization, fonts
Current Directory
Number of entries in history, file display options
Fonts, confirm deletion of variables
Array Editor
Fonts, numeric format
Display options
Figure Copy Template
Application, text, line, uicontrols, axis, format, background color, size
Display, fonts, and simulation

The preferences file is matlab.prf. Type prefdir in the Command Window to see the location of the file. The matlab.prf file is loaded when MATLAB starts and is overwritten when you close MATLAB.

Preferences remain persistent across MATLAB sessions. Note that some tools allow you to control these aspects from within the tool without setting a preference--use that method if you only want the change to apply to the current session.

  Accessing The MathWorks on the Web General Preferences for MATLAB