Preferences
Open Preferences window to view and change preferences
Description
MATLAB® provides various preferences for customizing MATLAB. You can use the Preferences window to access and set MATLAB preferences.
Some preferences are not available in MATLAB Online™.
Open the Preferences
To open the Preferences window, do one of the following:
MATLAB Toolstrip: On the Home tab, in the Environment section, click Preferences.
MATLAB command prompt: Enter
preferences
.
To view or change preferences for MATLAB or related products, in the left pane of the Preferences window, select a product and then select from the available categories. Change preferences in the right pane of the Preferences window and then click Apply or OK to accept the changes.
Preferences take effect immediately and remain persistent across sessions of MATLAB.
Examples
Programmatic Use
More About
Tips
To restore the default preferences for a given release of MATLAB, delete all of the files in the corresponding preferences folder. Use the
prefdir
command to determine the full path of the preferences folder.For example, to restore the default preferences for R2021a, type
prefdir
in the Command Window to determine the location of the preferences folder.prefdir
Close MATLAB, delete all of the files in the folderans = 'C:\Users\username\AppData\Roaming\MathWorks\MATLAB\R2021a'
C:\Users\username\AppData\Roaming\MathWorks\MATLAB\R2021a
and then start MATLAB again. MATLAB starts with all preferences set to their default values.One file to consider keeping is
history.m
. For more information, see Set Command History Preferences.
Version History
Introduced before R2006a