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 inMATLAB Online™.
Open the Preferences
To open the Preferences window, do one of the following:
MATLAB Toolstrip: On theHometab, in theEnvironmentsections, 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 clickApplyorOKto 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
ans = ' C: \ \用户用户名\ AppData \ \ 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, seeSet Command History Preferences.
版本历史
Introduced before R2006a