Azzera filtri
Azzera filtri

How to avoid setting of local directory as search path on startup?

2 visualizzazioni (ultimi 30 giorni)
Hello,
I used to use R2011 and before. I just installed R2013a. Now I have a little problem with my configuration: The directory I start matlab from gets added to the search path (recursively).
This is mad, since I have different projects in subfolders. I have to manually delete all dirs from search path before I can begin to work. This also results in BIG trouble if I start matlab from my home directory. Here a few thounds of dirs get added, whch take quite a bit of time to be first added and then manually (!) deleted.
How can I set up martlab to avoid adding the local dir to the search path?
I have two installations both with the same issue, so I think this is the default for now ?!?
Thank Christian Wolf

Risposta accettata

Christian
Christian il 4 Dic 2013
I've got it! The problem was that I added sdpt3 to my path. There is a startup.m file that caused the problems. After a small change in that file to disable the change of path not more issue.
Thanks Christian
  2 Commenti
Image Analyst
Image Analyst il 4 Dic 2013
Mind explaining (1) what exactly is sdpt3, since it's not in base MATLAB, (2) how it got into your startup.m file in the first place, and (3) how it recursively extends/adds to your path over and over again every time you launch MATLAB?
Christian
Christian il 4 Dic 2013
OK, SDPT3 is a toolbox for optimization interacting with yalmit (another toolbox) (see YALMIP and SDPT3).
The installation of SDPT3 tells you to add the directory of it to the path. In this directory there is a startup.m file, that is intended to add sdpt3 to the path of matlab (the second time if already installed as documented). This adds the output of pwd to the path, thus resulting in the described behaviour.
So it was not my startup.m file (there was not even one) but a file from an external toolbox.

Accedi per commentare.

Più risposte (2)

Image Analyst
Image Analyst il 4 Dic 2013
Put
restoredefaultpath
savepath
in your startup.m file. But personally I'd try to figure out the root cause of the problem in the first place.

Simon
Simon il 4 Dic 2013
Hi!
Use the matlab startup script matlabrc and restore the default path

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by