Main Content

Import Preferences From Other Releases

When you start a newly installed version of MATLAB® for the first time, it attempts to import your preferences from a previous release installed on your system. MATLAB can import preferences from as long as three releases ago. If you install a previous release on your system, MATLAB does not import preferences from releases that are newer than the release you are starting up.

When starting up for the first time, MATLAB looks for preferences folders.

  • If a preferences folder exists for any of the three releases of MATLAB that immediately precede the one you are starting up, MATLAB migrates the files from the most recent one.

    For example, if you start R2021a and a preferences folder exists for both the R2020b and R2019b releases, then MATLAB migrates the files from the R2020b preferences folder to the R2021a preferences folder.

  • If a preferences folder does not exist from the previous three releases, then MATLAB creates the default preference files for the release starting up.

    For example, if you start R2021a and neither R2020b, R2020a, or R2019b are installed, then MATLAB creates the default files for the R2021a release. This is true even if a preferences folder exists for the R2019a release or earlier.

To see the full path for the preferences folder type prefdir in the MATLAB Command Window. The name of the preferences folder matches the name of the release you are running. For example, for MATLAB R2021a, the name of the preferences folder is R2021a.

prefdir
ans =
    'C:\Users\username\AppData\Roaming\MathWorks\MATLAB\R2021a'

On macOS and iOS, the preferences folder might be inside another folder that is hidden. If so, to access the hidden folder:

  1. In the Finder, select Go > Go to Folder.

  2. In the resulting dialog box, type the path returned by prefdir, and then press Enter.

Use Default Preferences

Instead of importing preferences from a previous release, you can use the default preferences for the new release. To use the default preferences, delete all of the files in the preferences folder for the corresponding release. Use the prefdir command to determine the full path of the preferences folder.

For example, to use the default preferences for R2021a, start MATLAB, and in the Command Window, type prefdir to determine the location of the preferences folder.

prefdir
ans =
    'C:\Users\username\AppData\Roaming\MathWorks\MATLAB\R2021a'
Close MATLAB, delete all of the files in the folder 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.

Alternatively, if you have not started the new release yet, create an empty preferences folder for it. This will prevent MATLAB from importing preferences when you do open the new release, and force it to use the default preferences instead. For example, to use the default preferences for MATLAB R2021a, if your MATLAB preferences are stored in the C:\Users\username\AppData\Roaming\MathWorks\MATLAB folder, create the folder C:\Users\username\AppData\Roaming\MathWorks\MATLAB\R2021a.

See Also

|

Related Topics