simulation control in m-file

조회 수: 23 (최근 30일)
Hyoung-Sik Choi
Hyoung-Sik Choi 2013년 2월 15일
'sim' command is usually used for handling simulink in m-file.
I want to pause the sim when some conditon is matched, is it possible using 'sim' command in m-file? If not, is there no way to do that?

채택된 답변

TAB
TAB 2013년 2월 15일
set_param('ModelName', 'SimulationCommand', 'start')
set_param('ModelName', 'SimulationCommand', 'stop')
set_param('ModelName', 'SimulationCommand', 'pause') <- Pause simulation
set_param('ModelName', 'SimulationCommand', 'continue')
set_param('ModelName', 'SimulationCommand', 'update')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by