フィルターのクリア

Run matlab function inside a simulink model

2 ビュー (過去 30 日間)
Mehdi
Mehdi 2014 年 8 月 13 日
回答済み: Viren 2014 年 8 月 19 日
Greetings,
I'm trying to run a matlab function using function block inside a SIMULINK model but I get multiple errors. Since I have defined global variables in this function, I get this error:
"Global declaration not resolved to a Data Store Memory block registered via the Ports and Data Manager."
I don't get any errors for running this function in MATLAB. How can I resolve this?
Thanks for any help!

回答 (1 件)

Viren
Viren 2014 年 8 月 19 日
The global variables cannot be declared OUTSIDE the Function definition. You need to use the Data Store blocks provided in the Simulink library to read from and write into. This will work like an additional input into your block, and an additional output to update the value. This documentation gives more details.

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by