Azzera filtri
Azzera filtri

Start simulink simulation from cetrain time

1 visualizzazione (ultimi 30 giorni)
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

Risposta accettata

Fangjun Jiang
Fangjun Jiang il 26 Ago 2020
See these
set_param('vdp','SimulationCommand','start')
set_param('vdp','SimulationCommand','pause')
set_param('vdp','SimulationCommand','continue')
set_param('vdp','SimulationCommand','stop')
  3 Commenti
Fangjun Jiang
Fangjun Jiang il 27 Ago 2020
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 il 28 Ago 2020
Yes, It worked. Thanks

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Manual Performance Optimization in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by