How to use parameters from data dictionary in sinmulink's callback function?
17 ビュー (過去 30 日間)
古いコメントを表示
i have a simulink model , and Desing data defined in Data Dictionary. now i want to initialize a variable by parameters from data dictionary in initFcn function. but it doesn't work:
Undefined function or variable 'x'. Variable 'x' does not exist.
what should i do?
0 件のコメント
回答 (1 件)
Fangjun Jiang
2022 年 10 月 13 日
Use API to open the data dictionary and get the value, or the easiest thing to do is
2 件のコメント
Fangjun Jiang
2022 年 10 月 13 日
Did you try Simulink.data.evalinGlobal()? There is also Simulink.data.assigninGlobal()
参考
カテゴリ
Help Center および File Exchange で Workspace Variables and MAT Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!