Why am I unable to save my MATLAB path using MATLAB 7.9 (R2009b)?

3 vues (au cours des 30 derniers jours)
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.

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 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.

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits


Version

R2009b

Community Treasure Hunt

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

Start Hunting!

Translated by