i am working with simulink model where i have to launch my simulation for a specific time period. currently i am using
set_param('model_name','StartTime','0','StopTime','5');
set_param('model_name','SimulationCommand','start');
the problem with this approach is when simulation ends and i start it again, it starts from the beginning and all the simulation progress will lost. here i want to run the simulation from last state.How to do this?