Search code examples
matlabsimulink

how to step forward a simulink model programmatically


I have a simulink model, I want to step forward it programatically. is there any way to do it? I tried set_param('model','SimulationCommand','step') but it didn't work.


Solution

  • I wanted to step forward it only once(to start the simulation and pause it at 0 second) SO I tried set_param('model','SimulationCommand','start','SimulationCommand','pause'); It worked fine for me.