how can I change directory of matlabfunction to a writable directory preferably outside of MATLAB installation area?

795 views (last 30 days)
zainab
zainab on 5 Apr 2013
Commented: Son Vo on 12 Oct 2021
when I use matlab function error occur that [ The current directory is c:\program files\matlab\r2011a\matlab\bin, which is reserved for MATLAB files.
Please change your current directory to a writable directory preferably outside of MATLAB installation area.] from where can I change it?
  2 Comments
Sk Aminul Islam
Sk Aminul Islam on 2 Nov 2019
Your current dir is C:
Just click and browse other dir like D, or E or Desktop,Documents etc and create a folder into it and select the folder.
error.PNG

Sign in to comment.

Accepted Answer

Jan
Jan on 5 Apr 2013
cd(tempdir)
or
cd(userpath)
  13 Comments

Sign in to comment.

More Answers (3)

Nurbek Halikulov
Nurbek Halikulov on 3 Mar 2019
cd(tempdir)
Where I should write it?
  3 Comments

Sign in to comment.


venkat r
venkat r on 9 Feb 2017
matlab error "the current directory is c: /program files /matlab/r2012a/bin,registry,which is reverse for matlab files".

Hoang Mai
Hoang Mai on 24 Mar 2019
I can't repair error. I have created command into prompt as following:
c:>\cd Users\PC\Documents\MATLAB
So the result back yet:
The current directory 'c:\program files\matlab\r2016a\bin' is reserved for MATLAB files.
Please change your current directory to a writeable directory outside of the MATLAB installation area.
Component: Stateflow | Category: General error
Please change your current directory to a writeable directory outside of the MATLAB installation area.
Component: Simulink | Category: Model error
Can you help me!
  1 Comment
Jan
Jan on 25 Mar 2019
In which "prompt" do you enter this? In the command window of Matlab or of the operating system? What is the purpose of "c:>"? In the command shell of the operating system this tries to create the file 'Users\PC\Documents\MATLAB' inside the current directory and to write the output of 'c:' to it, which is empty. I guess you want to do:
cd C:\Users\PC\Documents\MATLAB

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by