Why is Matlab unable to change current folder?

90 Ansichten (letzte 30 Tage)
Chiara Pasquariello
Chiara Pasquariello am 14 Nov. 2021
Kommentiert: Walter Roberson am 2 Mär. 2025
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 Kommentar
Rik
Rik am 15 Nov. 2021
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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Chiara Pasquariello
Chiara Pasquariello am 4 Dez. 2021
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 Kommentare
Taichi Kurayama
Taichi Kurayama am 2 Mär. 2025
I mistakenly typed 2005, when I meant 2025.
Walter Roberson
Walter Roberson am 2 Mär. 2025
Which MacOS version are you using?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Anshika Chourasia
Anshika Chourasia am 3 Dez. 2021
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 Kommentar
Dyuman Joshi
Dyuman Joshi am 5 Mär. 2024
That is what OP is already using.
I don't see how your answer adds helps OP.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by