bloc MATLAB function directory error
2 views (last 30 days)
Show older comments
Hello, I have a little problem with the "MATLAB function" bloc of simulink. I'm using matlab 2011a, I made a very basic circuit, in input of the bloc "MATLAB function" there is a bloc "Repeating Sequence" and in output just a scope. I didn't change the code of fcn bloc. However, when I launch the simulation the following error appear:
The current directory is c:\program files\matlab\r2011a\bin, which is reserved for MATLAB files. Please change your current directory to a writable directory preferably outside of MATLAB installation area
I tried to change the saving directory, but nothing changed, always the same error. Do you have any idea how I could solve this problem?
Thank you,
1 Comment
Hasan Basri Altintas
on 1 Dec 2021
Edited: Image Analyst
on 11 Dec 2021
How to change current directory without coding in MATLAB Simulink.
Accepted Answer
Kaustubha Govind
on 27 Jan 2012
What do you get when you execute the following commands in MATLAB:
>> pwd
>> !cd
0 Comments
More Answers (4)
M Asif
on 18 Dec 2013
How can I change current saving directory?
Many thanks in advance.
1 Comment
Kaustubha Govind
on 18 Dec 2013
You can use "cd C:\some\other\path" at the MATLAB prompt to change the current directory.
Jerem
on 27 Jan 2012
Edited: Walter Roberson
on 22 Dec 2015
2 Comments
Kaustubha Govind
on 27 Jan 2012
You also need to change your MATLAB current directory to the folder containing the file. Use the cd command.
Kaustubha Govind
on 27 Jan 2012
After that, "pwd" should return the folder where your model is saved.
shantanu srivastava
on 28 Jan 2018
Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks. Use 'mex -setup' to select a supported C-compiler.
0 Comments
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!