필터 지우기
필터 지우기

Detect Simulation end with MATLAB

조회 수: 11 (최근 30일)
Christophe
Christophe 2012년 1월 20일
Hello,
I would like to know if it is possible to know when a Simulink model is done running.
I am using a M-file to load and run my model and I would like to detect the end of the simulation with a M-file, I have tried using get_param but I did not manage to make it work.
PS : The model saves a MAT file and is used after the simulation but it seems MATLAB(2007b) tries to use it before the simulation is done. That's why I would like to create a SimulationEnd flag.
Thank you in advance.

채택된 답변

Christophe
Christophe 2012년 1월 20일
I found my answer : get_param('sys','SimulationStatus')
It gives 'running' or 'stopped'.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by