How can I change a parameter in my simulation in the after sometime of the run time ?
3 ビュー (過去 30 日間)
古いコメントを表示
I have simulation model that will be run for 5 sec. I want to run my simulation for 3 sec, then change some parameters in my model and pause the run to end the remind 2 sec. How can I do it by fast way? I know there is a step forward to do it for each step but I need faster way.
0 件のコメント
回答 (1 件)
Urmila Rajpurohith
2020 年 5 月 22 日
To change the parameters in a model after x sec we need to pause the model when the Simulation time reaches to x sec
To do this we can use pause simulation using Assertion block Model in the top model
refer to the below documentation for how to create a pause simulation model using assertion block
In the Assertion block dialog box, clear the Stop simulation when assertion fails check box. Enter this command as the value of Simulation callback when assertion fails:
set_param(bdroot,'SimulationCommand','pause')
whenever the simulation time reaches to x sec it will pause the model and then user can change the parameters and continue the simulation.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!