Simulink constant parameter read inside Matlab Function block
古いコメントを表示
Hi. I defined some Simulink parameters to the Model Workspace of a Simulink model. When used in a Constant block, the code compiles with no error. When used in a Matlab Function block, I get the 'undefined variable' error.
How can I use global parameters in the Matlab Function block, without having to add an input port for each parameter?
Thanks
3 件のコメント
Azzi Abdelmalek
2012 年 10 月 12 日
your version of Matlab?
Azzi Abdelmalek
2012 年 10 月 12 日
how many parameters do you have? their size?
River Rock
2012 年 10 月 12 日
編集済み: River Rock
2012 年 10 月 12 日
採用された回答
その他の回答 (1 件)
Azzi Abdelmalek
2012 年 10 月 12 日
編集済み: Azzi Abdelmalek
2012 年 10 月 12 日
If you have sevral parameters with the same size , you can use one constant block with value
[param1 param2 ... paramn]
カテゴリ
ヘルプ センター および File Exchange で Simulink Functions についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!