1
votes

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?

2

2 Answers

2
votes

You could probably try something like that:

set_param('sys','SimulationCommand','pause')
pause(50)
set_param('sys','SimulationCommand','continue')
0
votes

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