Main Content

Settings Window

Open Settings window to view and change settings

Description

MATLAB® provides various settings for customizing MATLAB. You can use the Settings window to interactively access and modify MATLAB settings.

Some settings are not available or may vary in MATLAB Online™.

Settings window displaying the MATLAB General Settings page

Open the Settings Window

To open the Settings window, do one of the following:

  • MATLAB Toolstrip: On the Home tab, in the Environment section, click Settings.

  • MATLAB command prompt: Enter preferences.

To view or change settings for MATLAB or related products, in the left pane of the Settings window, select a product and then select from the available categories. Change settings in the right pane of the Settings window and then click Apply or OK to accept the changes.

Settings take effect immediately and remain persistent across sessions of MATLAB.

Examples

expand all

Open the Settings window with the MATLAB Colors Settings page selected.

preferences Colors

In the MATLAB output colors section, select the colors that you want to use from the Error text, Warning text, and Hyperlinks color palettes. The new colors appear in the Command Window sample area.

Settings window displaying the MATLAB Colors Settings page

Programmatic Use

expand all

preferences opens the Settings window. If the Settings window is already open, MATLAB brings focus to the tool.

You also can access and set some MATLAB settings programmatically. For more information, see Access and Modify Settings Programmatically.

example

preferences page opens the Settings window and selects the specified page.

example

More About

expand all

Tips

  • To restore the default settings for a given release of MATLAB, delete all of the files in the corresponding settings folder. Use the prefdir command to determine the full path of the settings folder.

    For example, to restore the default settings for R2025a, type prefdir in the Command Window to determine the location of the settings folder.

    prefdir
    ans =
        'C:\Users\username\AppData\Roaming\MathWorks\MATLAB\R2025a'
    Close MATLAB, delete all of the files in the folder C:\Users\username\AppData\Roaming\MathWorks\MATLAB\R2025a and then start MATLAB again. MATLAB starts with all settings set to their default values.

    One file to consider keeping is history.m. For more information, see Modify Command History Settings.

Version History

Introduced before R2006a

expand all