MATLAB Answers

Directory access error in MATLAB

2 views (last 30 days)
Why do I see the error: "The current directory c:\program files\matlab\r2019b\bin is reserved for MATLAB files" when I try to run the simulation for a model?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 Feb 2020
Edited: MathWorks Support Team on 25 Feb 2020
Some folders in MATLAB installation location are reserved for MATLAB files.
If these folders are set as the current working folder in MATLAB, you will get a directory access error.
To resolve the error, please change the current folder to a writable folder such as C:\Users\<user_name>\Desktop.
This can be done in two ways:
  1. Using cd command from the command line (
  2. Using GUI: Click on the folder-icon with green arrow on it (it has been marked with a red rectangle in the attached image) and select a writable folder such as C:\Users\<user_name>\Desktop _or _C:\Users\<user_name>\Documents.


Sign in to comment.

More Answers (0)

Sign in to answer this question.