How can i run a simulink model for given simulation time
11 次查看(过去 30 天)
显示 更早的评论
I have a simulink model which i am controlling from Matlab engine in C++ application. i start the simulation by using command set_param("mySimulinkModel","SimulationCommand","start"). now my requirement is the run the simulink model only for given simulation time (timeStep), once the simulation exceed the given simulation time step it should be paused.
how can i setup my model to run it only for given simulation time step?
0 个评论
采纳的回答
Mischa Kim
2014-2-5
编辑:Mischa Kim
2014-2-5
Bhawesh, you mean, you would like to set the simulation stop time? This is done using
set_param('mySimulinkModel','StartTime','5','StopTime','100')
showing also start time set up. For a complete list of model parameters check out the documentation.
3 个评论
Mischa Kim
2014-2-5
All right, then simply use
set_param('mySimulinkModel','SimulationCommand','pause')
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!