This issue most of the time is due to MATLAB not being able to create the preferences directory in the default location.
The default location for the preferences directory would be :
In this example, replace <username> with your username. Windows has a shortcut to take you right to the Roaming folder, and it is:
Enter this shortcut in the search field located in your Start Menu (Windows 7), Start Screen (Windows 8.1) or Taskbar (Windows 10) and hit enter to jump right to the relevant Roaming folder.
Once you have accessed this directory, make sure that there is an existing directory that correlates with the release of MATLAB you are using. If one does not exist you will need to create an empty directory with the release name as it's name.
EXAMPLE: R14SP3 would be the name of the directory for the R14SP3 release.
R2007a would be the name of the directory for the R2007a release.
Make sure to close and reopen the file explorer after making these directories to ensure that they were saved.
Make sure that your user account can write to this location, otherwise you can change the default location to a directory you do have access to:
This issue can also be related to the following article:
If you are still encountering this issue please Contact MathWorks support