How do I import my MATLAB path preferences when I install a new version of MATLAB?
11 次查看(过去 30 天)
显示 更早的评论
I would like to port all my preferences from one MATLAB version to another. I want to port over the path preferences to the new version of MATLAB which is not part of the standard preferences directory.
采纳的回答
MathWorks Support Team
2015-5-20
A new version of MATLAB ports over most user preferences if there is an older release of MATLAB on the system. However, this is a limitation where the user defined paths are not carried over from one release to another.
You can manually transfer the path information. All of the MATLAB Path information is saved in the PATHDEF.M file. What you can do is save the PATHDEF.M file from your current installation of MATLAB before you uninstall it. We suggest uninstalling MATLAB rather than installing on top of a current installation.
You can locate the PATHDEF.M file by executing the following at the MATLAB command prompt:
which pathdef
After the new version of MATLAB is installed:
1. Open the old PATHDEF.M file and the new PATHDEF.M file.
2. Copy and paste all of the directories you wish to keep on the MATLAB Path from the old PATHDEF.M file into the new PATHDEF.M file. The new PATHDEF.M file should already have the MATLAB and Toolbox directories listed, so you should only have to add your personal directories.
3. Save the PATHDEF.M file.
4. Restart MATLAB and run the PATHDEF command.
5. Run the PATH command to make sure the path was set up properly.
Troubleshooting:
Create a PATHDEF.m that includes all installed toolboxes by executing the following code at the command prompt:
restoredefaultpath
savepath
Then perform steps 1 through 5 to add your personal directories.
1 个评论
K E
2014-9-17
This is a lifesaver. But why not automate it, i.e. look for the last pathdef.m file, extract all the non-Matlab user-defined directories, and copy them to the new pathdef.m? It would greatly increase the convenience of Matlab updates.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!