MATLAB Answers

How to migrate all settings, preferences, histories, layouts, ... _everything_ user related from 2013a to 2014a?

162 views (last 30 days)
I spent significant time and effort to get the user interface for v2013a set up exactly the way I wanted it. Plus, my use of matlab is ongoing. What I was doing yesterday using 2013a, I want to continue today using 2014a.
A migration of all user-related info ought to be about the first thing that matlab does when upgrading between versions. But it does not. Therefore there ought to be something inthe installation manual, or at least a README file that explains how to make the yearly transition seamless. If there is something there, I cannot not find it.
According such documentation as I could find, all one has to do is delete the 2014a prefs folder,
C:\Users\<user name>\AppData\Roaming\MathWorks\MATLAB\R2014a
and matlab will automatically recreate it and migrate everything from
C:\Users\<user name>\AppData\Roaming\MathWorks\MATLAB\R2013a
to the new version.
Well, of course it does not. I've tried manually copying the contents of the 2013a folder to the 2014a folder, but that results in a huge spewing of java errors on the command window when I attempt to open the history window. It appears that nothing at all is migrated.
So, how do I do migrate ALL my settings, histories, layouts, paths, etc. from one version to the next?

Accepted Answer

Namita Vishnubhotla
Namita Vishnubhotla on 22 Jul 2014
MATLAB preferences will get automatically migrated to new installations, but user-defined preferences will not.
To manually migrate user-defined preferences to a new installation, use the following procedure:
1) In the older installation, execute the command,
>> prefdir
2) Look in the directory from step 1 to find a file called 'matlabprefs.mat'.
3) In the newer installation, execute the command,
>> prefdir
4) Copy the file from step 2 into the directory from step 3.
Note that this will erase any user-defined preferences in the newer installation.
  4 Comments
Peter Cervelli
Peter Cervelli on 7 Oct 2019
Please answer Eric's question from October 6, 2019 -- I'm suffering from the same issue. I spent a lot of time setting preferences so that they're exactly the way I want them, and it's very frustrating to fire up the latest version of Matlab only to find that they've been completely ignored. I've been using Matlab more or less continuously since 1996, and I manage a group of users comprising more than 30 licenses so a quick answer to Eric's question is pretty important to me.
Thanks.

Sign in to comment.

More Answers (3)

Alan Peters
Alan Peters on 7 Oct 2019
Here is a way to do the migration manually that has worked for me in the past. The instructuctions are below and they are in the text file that I have attached to this note.
-----------------------------------------------------------------------------------------------------------------------
How to migrate history and preferences to from an older version of Matlab to a newer one.
In the following I refer to the old version as RoldV (e.g. R2017a) and the new version as
RnewV (e.g. R2018a).
1) Open the new version of matlab and then exit it.
2) Go to "C:\Users\<user name>\AppData\Roaming\MathWorks\MATLAB\RnewV"
and delete the file, "History.xml".
3) Copy the entire contents of "C:\Users\<user name>\AppData\Roaming\MathWorks\MATLAB\RoldV"
to the RnewV folder listed above. Permit overwriting of like-named files.
4) Go to "C:\Program Files\MATLAB\RoldV\toolbox\local" and open "pathdef.m" in a text editor.
5) Go to "C:\Program Files\MATLAB\RnewV\toolbox\local" and open its "pathdef.m" file in a text editor.
6) From the first file (the RoldV version) copy everything after "%%% BEGIN ENTRIES %%%'
but before "matlabroot,'\toolbox\matlab\testframework;', ...".
7) Paste that info after "%%% BEGIN ENTRIES %%%' in the second file (the RnewV version).
8) Save the second file.
9) Open matlab. It will give you an error about the path cache being corrupt.
10) Close matlab.
11) Open matlab.
As far as I can tell, everything has now been migrated from RoldV to RnewV.
  6 Comments

Sign in to comment.


Jude Sauve
Jude Sauve on 2 Jun 2020
The case, as documented, for me was when upgrading by more than 3 half versions, it wouldn't auto update. For me, upgrading from 2018a to 2020a (Three half versions before 2020a was 2018b).
Under C:/Users/<User>/AppData/Roaming/MathWorks/MATLAB/, I found it sufficient to (while all matlabs closed) delete the directory corresponding to my new version, ex 2020a, then rename the dir with my preferences to the oldest "supported" version. Ex rename/F2 the 2018a/ dir to 2018b/. Then on opening the new version of matlab (2020a) it did grab the old preferences from that directory. Then close new matlab (2020a) and change the name of the directory back. (If you don't just delete already).

James Brown
James Brown on 8 Dec 2020
Migrate preferances from a previous version
Run the old MATLAB version and find the preferance folder
OldFolder = prefdir % run in old version
Run the new MATLAB version and find the preferance folder
NewFolder = prefdir % run in new version
Exit matlab, then zip all the files in NewFolder in case something goes wrong
Copy all the files & folders from OldFolder to NewFolder (overwrite existing files!)
Restart matlab
As of migrate to 2020b, everything seems to migrate
I'm using "Home" version, but I'm thinking they'll all work this way except possibly network instalations

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by