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™.
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
Programmatic Use
More About
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
Close MATLAB, delete all of the files in the folderans = 'C:\Users\username\AppData\Roaming\MathWorks\MATLAB\R2025a'
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.