Why am I unable to save my MATLAB path using MATLAB 7.9 (R2009b)?
22 views (last 30 days)
Show older comments
I am not an administrator on this machine. Therefore, I am unable to save the path in 'pathdef.m' in its default location (as I do not have write privileges in the installation folders).
Thus, I have saved pathdef.m in another folder which is on my path. Now, I add more directories to the MATLAB path and save it. I can see that pathdef.m is updated and it contains the new paths. However, when I quit MATLAB and restart it, MATLAB restores to the default MATLAB path and it does not recognize the folders that I recently added. I have to add these folders to the path again.
Accepted Answer
MathWorks Support Team
on 7 Jan 2010
This occurs because MATLAB is using your old pathdef.m file to load the path at startup.
To resolve this issue, place the new pathdef.m in your startup folder. You can set your startup folder using USERPATH. You can read more about this in the documentation for SAVEPATH:
doc savepath
Alternatively, use the ADDPATH command in a startup.m file (located in the startup directory or on your MATLAB path) to add the directories to your path. MATLAB will always execute the startup.m file at startup.
0 Comments
More Answers (0)
See Also
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!