I have found a block named "stop" in simulink ,
anybody know what shall i do , m function? s-function?
This may address one part of your question. I recently created an example
showing how to perform a "simulation pause" from an Simulink M-S-Function
block. It's sort of a conditional breakpoint for Simulink, with the block
reacting to values on the input port. It's on MATLAB Central, under
Utilities -> Simulink -> Simulation Pause:
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=7907&objectType=file
The block only allows pause; for stop, you can use the Simulink Stop block,
or easily modify the M-S-Function in the example to perform the stop.
What did you mean by "reset"? Start over at time zero?
Regards,
--Don
"redHeli" <xiao...@yahoo.com.cn> wrote in message
news:E6742988CB8F6298...@in.webx.raydaftYaTP...
set_param('name_of_your_simulink_model','SimulationCommand','start');
set_param('name_of_your_simulink_model','SimulationCommand','stop');
set_param('name_of_your_simulink_model','SimulationCommand','paused');
I need to reset a model within an m-file. I know using :
set_param(model, 'SimulationCommand', 'start')
set_param(model, 'SimulationCommand', 'stop')
can start ans stop a model within a m-file. But how about reseting - i.e. stopping the model and then re-starting from initial condition, time = 0 ?
Thanks.