How can I change a parameter in my simulation in the after sometime of the run time ?
1 view (last 30 days)
Show older comments
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 Comments
Answers (1)
Urmila Rajpurohith
on 22 May 2020
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 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!