Error using cd, Cannot CD
7 ビュー (過去 30 日間)
古いコメントを表示
When I tried to run the following code in my matlab, it said" Error using cd, Cannot CD to( Name is nonexistent or not a directory), could you tell me why this happens, thank you very much!
if(~isdeployed)
cd(fileparts(which(mfilename)));
end
0 件のコメント
採用された回答
the cyclist
2020 年 7 月 12 日
This code works for me when mfilename is a file that exists in my path, but otherwise it gives that error. So, my guess is that you have an error in what is stored in mfilename.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で File Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!