In Matlab if I type:
path('some_random_folder')
I cannot run any commands, I cannot even quit MATLAB, i need to force quit it.
what happens here? anyone?

 採用された回答

Geoff Hayes
Geoff Hayes 2014 年 10 月 27 日

0 投票

Nitin - you are changing the MATLAB search path when doing
path('some_random_folder')
Since you are specifying a new folder, you are losing all of the default (and other) folders that the MATLAB search path included previously. So you won't be able to run any of the MATLAB built-in functions or any of your functions.
To see all of the information that you are losing, type
path
and something similar to the following will appear
/Applications/MATLAB_R2014a.app/toolbox/matlab/demos
/Applications/MATLAB_R2014a.app/toolbox/matlab/graph2d
/Applications/MATLAB_R2014a.app/toolbox/matlab/graph3d
/Applications/MATLAB_R2014a.app/toolbox/matlab/graphics
/Applications/MATLAB_R2014a.app/toolbox/matlab/plottools
/Applications/MATLAB_R2014a.app/toolbox/matlab/scribe
/Applications/MATLAB_R2014a.app/toolbox/matlab/specgraph
/Applications/MATLAB_R2014a.app/toolbox/matlab/uitools
/Applications/MATLAB_R2014a.app/toolbox/local
etc.
(The above is from R2014a, OS X 10.8.5.)
If you wish to add a new folder to the MATLAB search path, then just do
path(path,'some_random_folder');

1 件のコメント

Nitin
Nitin 2014 年 10 月 27 日
Thank you Goeff

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB についてさらに検索

タグ

質問済み:

2014 年 10 月 26 日

コメント済み:

2014 年 10 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by