Is there a way to abort Simulink simulation programatically if it takes a long time?
Show older comments
I have a model that, depending on some variable values sometimes runs very slowly. Typically I try out many different variable values in a loop, i.e. I start the simulation from a MATLAB script. Is there a way to abort the simulation without breaking the loop if the simulation takes too long?
Accepted Answer
More Answers (2)
R
on 26 Jan 2011
Walter Roberson
on 25 Jan 2011
0 votes
In the MATLAB routine you could start a timer that would fire at the end of your wait. In the timer callback, you would instruct the simulation to stop.
I do not know the details at all, as I have not used simulink. It might involve setting a parameter and using a STOP block; see a recent cssm post
Categories
Find more on Programmatic Model Editing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!