Simulation time in Simulink
Show older comments
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?
Accepted Answer
More Answers (2)
Ankita Bansal
on 25 Jun 2018
Edited: Ankita Bansal
on 25 Jun 2018
0 votes
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 Comments
Pablo Panitta
on 25 Jun 2018
Edited: Pablo Panitta
on 25 Jun 2018
Ankita Bansal
on 25 Jun 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
on 27 Jun 2018
0 votes
Categories
Find more on General Applications in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
