필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Christian
Christian 2013년 12월 4일
댓글: Christian 2013년 12월 4일
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

채택된 답변

Christian
Christian 2013년 12월 4일
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
Image Analyst
Image Analyst 2013년 12월 4일
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 2013년 12월 4일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Image Analyst
Image Analyst 2013년 12월 4일
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 2013년 12월 4일
Hi!
Use the matlab startup script matlabrc and restore the default path
  댓글 수: 2
Christian
Christian 2013년 12월 4일
You mean every time I start matlab?
Simon
Simon 2013년 12월 4일
No! Put the commands in startup.m, like Image Analyst showed above.

댓글을 달려면 로그인하십시오.

카테고리

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