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 looks for preferences folders according to these guidelines.

  • MATLAB looks for a preferences folder for release R2019b or newer. If MATLAB finds one or more preferences folders matching that criteria, it migrates the files from the most recent version.

    For example, if you start R2021b and preferences folders exist for both the R2020b and R2019b releases, then MATLAB migrates the files from the R2020b preferences folder to the R2021b preferences folder.


    For releases before R2021b, MATLAB looks back three releases. For example, if you start R2019a, MATLAB looks for preferences from R2018b, R2018a, and R2017b.

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

    For example, if you start R2021a, MATLAB looks for preferences for versions R2020b, R2020a, and R2019b. If none of those is installed, MATLAB creates the default files for the R2021a release. This is true even if a preferences folder exists for the R2019a release or earlier.

  • If you install a release older than the current version, MATLAB does not import preferences from releases that are newer than that release.

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.

ans =

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.

ans =
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