How can I change a parameter in my simulation in the after sometime of the run time ?

3 ビュー (過去 30 日間)
Willim
Willim 2020 年 4 月 16 日
回答済み: Urmila Rajpurohith 2020 年 5 月 22 日
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.

回答 (1 件)

Urmila Rajpurohith
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.

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by