change the simulation stop time from a block
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Golden
am 7 Apr. 2020
Kommentiert: Ameer Hamza
am 9 Apr. 2020
I understand you may change the simulation stop time using set-param function. However, I'd like to do the same thing with a block. This way I can make it to a library so that people just take it from library and drop to his/her model. I need to be able to change the stop time which is calcuated by this block. Thanks.
0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 7 Apr. 2020
You can stop the simulation at any using stop block: https://www.mathworks.com/help/simulink/slref/stopsimulation.html. You can define a condition, and when the condition becomes true, the simulation stops. Note, this method will only allow decreasing the simulation time. If you want to run the simulation, longer than the stop-time, I am not sure whether it is possible.
16 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!