Reputation: 21
How can i pause simulation in simulink by set_param command for certain timespan eg. 50 seconds ? Is there any other way to pause the simulation from matlab for specific time period?
Upvotes: 2
Views: 3148
Reputation: 96
The answer posted by am304 is perfect for your question. I just wanted to know whether you will execute these commands at a random simulation time or at a specific simulation time, say at 1.05 sec?
If your aim is to pause the simulation at a specified simulation time, refer this answer: https://stackoverflow.com/a/38348315/6580313
Upvotes: 0
Reputation: 13886
You could probably try something like that:
set_param('sys','SimulationCommand','pause')
pause(50)
set_param('sys','SimulationCommand','continue')
Upvotes: 3