Import simulink block model to workspace
3 ビュー (過去 30 日間)
古いコメントを表示
I have a coding in workspace and a simulink block model seperately.
During normal routinue: i firstly run initial workspace files and then open simulink block model and run. simulink block model variables get its value from work space.
Now i want to run directly simulink block model into workspace by using any matlab command.
for example
I write coding and run it. workspace coding run until its middle then it need a value of output varible (present in simulink block model). but this value generate after complete excecution of block model. so i want a command that automatically run this model and get result in workspace.
I try to use command "load *( model name)" but not working.
Can anyone give its answer using its expertees. thanks in advance. regards
0 件のコメント
回答 (1 件)
Walter Roberson
2022 年 4 月 23 日
Simulink variables are not available to MATLAB until the model is paused or stopped.
You can control the stop time using the sim() command; see https://www.mathworks.com/matlabcentral/answers/254468-set-simulation-time-and-fixed-step-size-for-a-simulink-model-from-the-command-line#answer_199521
参考
カテゴリ
Help Center および File Exchange で Sources についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!