How can I move my MATLAB Path from my old version of MATLAB over to a new version?

15 次查看(过去 30 天)

采纳的回答

MathWorks Support Team
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. With normal installation settings, you can usually find pathdef.m file in the following directory:
C:\Program Files\MATLAB\R2013b\toolbox\local\pathdef.m
We suggest uninstalling MATLAB rather than installing on top of a current installation.
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 new pathdef.m file.
4. Open MATLAB and run the PATHDEF command.
5. Run the PATH command to make sure the path was set up properly.

更多回答(1 个)

KAE
KAE 2019-10-1
编辑:KAE 2019-10-1
Upgrading to R2019b from R2019a, I copied my personal directories into the new pathdef.m file using the R2019b matlab editor and ran pathdef, but they did not appear on the path command until I restarted R2019b.
Also note that you have to run Matlab as an administrator in order to edit pathdef.m . This can be done in Windows 10 by right clicking on the R2019b icon, choosing 'More', then 'Run as Administrator'.

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by