bloc MATLAB function directory error

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 ExchangeSearch 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