Virtual drive as current directory in MATLAB

2 ビュー (過去 30 日間)
Nirmal Das
Nirmal Das 2011 年 12 月 20 日
Hi,
I have created a virtual drive in OS command prompt using "subst" as Z. I need to set this Z as my current directory in MATLAB. However, MATLAB does not recognize the virtual drive created. Please give your inputs to solve this.
Thanks Nirmal
  2 件のコメント
Jan
Jan 2011 年 12 月 20 日
Please post the complete relevant code, such we can reproduce the problem exactly - or find the bug in your code.
Nirmal Das
Nirmal Das 2011 年 12 月 20 日
Map.cmd is located in the folder "E:\Project"
Made a virtual drive Z by executing Map.cmd file with the following code:
"subst Z: /d
subst Z: .
pause"
Now a virtual drive Z is created in the computer which maps to the directory "E:\Project".
Now I try to access the directory using Current directory in MATLAB, but, Browse does not show the drive Z. Even "cd Z:" gives me the following error:
"??? Error using ==> cd
Cannot CD to Z: (Name is nonexistent or not a directory)."

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

採用された回答

Jan
Jan 2011 年 12 月 20 日
Please try this from inside Matlab:
system('subst Z: /d')
system('subst Z: E:\Project')
cd Z:
  1 件のコメント
Nirmal Das
Nirmal Das 2011 年 12 月 20 日
Thanks Jan. This worked.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by