Main Content

Where MATLAB Stores Settings

MATLAB® and other MathWorks® products store their settings in the settings folder. To see the full path for the settings folder type prefdir in the MATLAB Command Window. The name of the settings folder matches the name of the release. For instance, for release R2025a, the name of the settings folder is R2025a.

On macOS and iOS, the settings 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.

You must have write access to the settings folder. Otherwise, MATLAB generates an error in the Command Window when you try to change settings. MATLAB also can generate an error if the settings folder is hidden.

The default location of the settings folder is platform specific:

  • Windows®C:\Users\username\AppData\Roaming\MathWorks\MATLAB\release

  • Linux®~/.matlab/release

  • macOS~/Library/Application Support/MathWorks/MATLAB/release

release is the current MATLAB release.

Temporary Settings Folder

In some situations, if MATLAB is unable to create or use the settings folder when starting up, it creates a temporary settings folder. If a settings folder exists for any of the three releases of MATLAB that immediately precede the one you are starting up, MATLAB copies the settings files from that release to the temporary settings folder. Otherwise, MATLAB creates the default settings files for the current release. MATLAB continues to use the temporary settings folder until the issue is resolved.

If you make changes to settings while MATLAB is using the temporary settings folder, the settings persist across sessions. But, once the issue is resolved that was preventing MATLAB from accessing the settings folder, any changes made to the settings while using the temporary settings folder are lost.

Each version of MATLAB can have a temporary settings folder. MATLAB does not migrate settings from the temporary settings folder across releases.

Effects of Installation and Deinstallation on the Settings Folder

Installing MATLAB has no effect on the settings folder. That is, MATLAB creates, checks, copies, and writes to the settings folder when it starts up, not when you install it. When you uninstall MATLAB, there is an option in the uninstaller to remove the settings folder. However, this option is not selected by default.

See Also

|

Topics