Why is Matlab unable to change current folder?

90 ビュー (過去 30 日間)
Chiara Pasquariello
Chiara Pasquariello 2021 年 11 月 14 日
コメント済み: Walter Roberson 2025 年 3 月 2 日
I have just downloaded R2021b version of Matlab, but I have problems with the folders. When I run it, the initial folder is that of my User, from where I try to open the Desktop, where all my old files are saved. A message appears stating
"Error using cd
Unable to change current folder to '/Users/Cuchaira/Desktop'."
How can I solve the problem?
  1 件のコメント
Rik
Rik 2021 年 11 月 15 日
How exactly are you trying to change the current folder? The error looks like you are using windows, and forgot C: and are using the wrong slashes.

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

採用された回答

Chiara Pasquariello
Chiara Pasquariello 2021 年 12 月 4 日
Problem solved, it was just that I had not allowed Matlab to access to all the files on the Mac. Thanks everyone for you answers!
  6 件のコメント
Taichi Kurayama
Taichi Kurayama 2025 年 3 月 2 日
I mistakenly typed 2005, when I meant 2025.
Walter Roberson
Walter Roberson 2025 年 3 月 2 日
Which MacOS version are you using?

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

その他の回答 (1 件)

Anshika Chourasia
Anshika Chourasia 2021 年 12 月 3 日
Hi Chiara,
For changing the current folder “cd” command is used. Please refer the following link for more details: Change current folder - MATLAB cd (mathworks.com).
  1 件のコメント
Dyuman Joshi
Dyuman Joshi 2024 年 3 月 5 日
That is what OP is already using.
I don't see how your answer adds helps OP.

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

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by