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

Hasan Basri Altintas
Hasan Basri Altintas 2021년 12월 1일
편집: Image Analyst 2021년 12월 11일
How to change current directory without coding in MATLAB Simulink.

댓글을 달려면 로그인하십시오.

 채택된 답변

Kaustubha Govind
Kaustubha Govind 2012년 1월 27일

2 개 추천

What do you get when you execute the following commands in MATLAB:
>> pwd
>> !cd

추가 답변 (4개)

Jerem
Jerem 2012년 1월 27일

1 개 추천

It works! Thank you

댓글 수: 4

thiru berg
thiru berg 2016년 2월 13일
Hey jerem, can you please help me with how you cleared this error. with some clear steps. Thanks in advance
marwa moustafa
marwa moustafa 2017년 1월 20일
you first make new folder in any other place for example you will make new folder "Ahmad"in the Local Disk (D) then write in command window in matlab >> cd D:\Ahmad
hesham ibrahim
hesham ibrahim 2017년 7월 29일
thanks marwa its the only way working on my prog
Jan
Jan 2018년 3월 10일
[MOVED from flag]:
Sherif Said wrote: Thanks Marwa.
@Sherif Said: Please use flags only to inform admins and editors about contents, which might conflict with the terms of use, e.g. by rudeness or spam. Thanks.

댓글을 달려면 로그인하십시오.

M Asif
M Asif 2013년 12월 18일

1 개 추천

How can I change current saving directory?
Many thanks in advance.

댓글 수: 1

Kaustubha Govind
Kaustubha Govind 2013년 12월 18일
You can use "cd C:\some\other\path" at the MATLAB prompt to change the current directory.

댓글을 달려면 로그인하십시오.

Jerem
Jerem 2012년 1월 27일
편집: Walter Roberson 2015년 12월 22일

0 개 추천

I get :
>> pwd
ans =
C:\Program Files\MATLAB\R2011a\bin
>> !cd
C:\Program Files\MATLAB\R2011a\bin
>> pwd
Even if I saved the file in a other folder ...

댓글 수: 2

Kaustubha Govind
Kaustubha Govind 2012년 1월 27일
You also need to change your MATLAB current directory to the folder containing the file. Use the cd command.
Kaustubha Govind
Kaustubha Govind 2012년 1월 27일
After that, "pwd" should return the folder where your model is saved.

댓글을 달려면 로그인하십시오.

shantanu srivastava
shantanu srivastava 2018년 1월 28일

0 개 추천

Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks. Use 'mex -setup' to select a supported C-compiler.

카테고리

도움말 센터File Exchange에서 Search Path에 대해 자세히 알아보기

태그

질문:

2012년 1월 26일

편집:

2021년 12월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by