フィルターのクリア

problem with understanding the operators and special characters

2 ビュー (過去 30 日間)
farzad
farzad 2014 年 4 月 27 日
コメント済み: farzad 2014 年 4 月 27 日
Hi all
I have a file that contains these lines :
MatDir=pwd; cd('../')
I could not search in matlab help for somehting that can tell me what it means , if you know that , I will be thankful , and also in general I need to know when I see these combinations , where to refer ?
best regards

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 4 月 27 日
You can test it in Matlab windows command
% If your current forlder is D:\a\b, after
cd('../')
The current folder will be D:\a
The same with pwd
pwd % gives you the current folder

その他の回答 (1 件)

Geoff Hayes
Geoff Hayes 2014 年 4 月 27 日
Hi farzad,
The first line, MatDir=pwd; is simply setting the local variable MatDir to the current working directory. Try typing this at the MATLAB command window, and also type help pwd for more details on this command.
The second line, cd('../') simply changes the current working directory to one level above that. Again, from the MATLAB command window, try this command and then re-type pwd. Also, to look for help on this and other commands, just type help cd.
Note that these two commands aren't specific to MATLAB in any way…
Geoff

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by