Setting the end time in Simulink through an m-file; Online help seems to be wrong and unhelpful
3 ビュー (過去 30 日間)
古いコメントを表示
I am using commands like the following:
set_param('practicesimmodel','StartTime','0','StopTime','20');
sim('practicesimmodel');
However, MATLAB is totally ignoring what I set as the StoptTime and continues using what has been placed in the simulink model window. How do I automate this so I can change the stoptime from within an mfile?
thanks
0 件のコメント
回答 (1 件)
Fangjun Jiang
2021 年 3 月 10 日
Open the model, run the first line and check the model, you will see the 'StopTime' is changed.
The problem is with the second line. Give it a return variable like out=sim('practicesimmodel') and check the result.
This is really the problem with the Mathworks.
2 件のコメント
参考
カテゴリ
Help Center および File Exchange で Configure and View Diagnostics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!