How can I PERMANENTLY change the path each time MATLAB is opened?

10 views (last 30 days)
Every time Matlab closes, the path is reset. How can I permanetly change the path, so that when I open matlab next time, that the path is still the same. Each time I use MATLAB I have to set the path. How can this permanently be changed?

Answers (1)

John D'Errico
John D'Errico on 27 May 2020
Edited: John D'Errico on 27 May 2020
help savepath
As well, if you were setting the path using pathtool, there is an option to SAVE the path.
This leaves only the case where you upgrade MATLAB, and then the new release will just a see the default path. You can resolve that issue too, since I uploaded a tool to the file exchange a few years ago. It allows you to export your current search path to a file from the old version of MATLAB. Then you upgrade MATLAB, and then import the old search path from the file using a utility I created for you to use.
I do exactly this whenever I upgrade my MATLAB release. It saves me a great deal of time in recreating the search path.
While I believe this was not the original context of your question, which is simply resolved by saving the path, export_search_path is a useful tool that I use with every new release.

Categories

Find more on Search Path in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!