Simulation time in Simulink
Mostra commenti meno recenti
I need to run a simulation from x sec to y sec in Simulink enviroment. I go to Solver --> set Start time=x Stop Time=y and run simulation. But this doesn´t work because simulation keep starting @ 0 sec. Does anybody knows how to do it?
Risposta accettata
Più risposte (2)
Ankita Bansal
il 25 Giu 2018
Modificato: Ankita Bansal
il 25 Giu 2018
0 voti
Hi, can you see time offset(=4) at bottom right of your figure window?
The time offset is actually the start time you have given. The simulation runs from T=4 sec to T=12 sec only. It's just that the graph is shifted by 4 secs (x secs ).
You can also export the data to workspace and check for the min and max values of tout.
2 Commenti
Pablo Panitta
il 25 Giu 2018
Modificato: Pablo Panitta
il 25 Giu 2018
Ankita Bansal
il 25 Giu 2018
"simulation actually last 8 sec"
Hi Pablo, simulation is running for 4 to 12 secs (for 8 secs duration). And the graph you are getting is also for 4 to 12 secs, it's just shifted by 4 secs. (4->0 and 12 ->8)
So (x,y) point in the graph actually corresponds to (x+4,y).
Pablo Panitta
il 27 Giu 2018
0 voti
Categorie
Scopri di più su General Applications in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

