Where MATLAB Stores Preferences
MATLAB® and other MathWorks® products store their preferences in the preferences folder. 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. For instance, for release R2016b, the name of the preferences folder is
On macOS and iOS, the preferences folder might be inside another folder that is hidden. If so, to access the hidden folder:
In the Finder, select Go > Go to Folder.
In the resulting dialog box, type the path returned by
prefdir, and then press Enter.
You must have write access to the preferences folder. Otherwise, MATLAB generates an error in the Command Window when you try to change preferences. MATLAB also can generate an error if the preferences folder is hidden.
Temporary Preferences Folder
In some situations, if MATLAB is unable to create or use the preferences folder when starting up, it creates a temporary preferences folder. If a preferences folder exists for any of the three releases of MATLAB that immediately precede the one you are starting up, MATLAB copies the preference files from that release to the temporary preferences folder. Otherwise, MATLAB creates the default preference files for the current release. MATLAB continues to use the temporary preferences folder until the issue is resolved.
If you make changes to preferences while MATLAB is using the temporary preferences folder, the preferences persist across sessions. But, once the issue is resolved that was preventing MATLAB from accessing the preferences folder, any changes made to the preferences while using the temporary preferences folder are lost.
Each version of MATLAB can have a temporary preferences folder. MATLAB does not migrate preferences from the temporary preferences folder across releases.
Effects of Installation and Deinstallation on the Preferences Folder
Installing MATLAB has no effect on the preferences folder. That is, MATLAB creates, checks, copies, and writes to the preferences folder when it starts up, not when you install it. When you uninstall MATLAB, there is an option in the uninstaller to remove the preferences folder. However, this option is not selected by default.