Start simulink simulation from cetrain time

조회 수: 3 (최근 30일)
Lila Lotus
Lila Lotus 2020년 8월 1일
댓글: Lila Lotus 2020년 8월 28일
Dear all,
I start simulink simulation multiple time (with clear mex inbetween) and I want to set simulation start time, so that it advances with each simulation.
i.e.
out=sim('mysim','StartTime','100','StopTime','130')
But this start time sims to be ignored.ssGetTime sims to return values starting from 0.
Is it possible to set start simulation time somehow?
Thanks

채택된 답변

Fangjun Jiang
Fangjun Jiang 2020년 8월 26일
See these
set_param('vdp','SimulationCommand','start')
set_param('vdp','SimulationCommand','pause')
set_param('vdp','SimulationCommand','continue')
set_param('vdp','SimulationCommand','stop')
  댓글 수: 3
Fangjun Jiang
Fangjun Jiang 2020년 8월 27일
Open the example model 'vdp', press Ctrl+E, go to Data Import/Export, check to output time as "tout", run
a=sim('vdp','StartTime','30','StopTime','50')
check the value of a.tout. It shows time from 30 to 50.
Can you verify?
Lila Lotus
Lila Lotus 2020년 8월 28일
Yes, It worked. Thanks

댓글을 달려면 로그인하십시오.

추가 답변 (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