Filter löschen
Filter löschen

Discrepancy in Simulation Time

1 Ansicht (letzte 30 Tage)
Fabian Pagel
Fabian Pagel am 14 Feb. 2019
Hi,
I'm currently running a Simulink simulation through Matlab.
But I have noticed that the simulation time in Simulink(either in the lower status bar or when displayed from Clock) is one timestep behind to when I fetch the simulation time in Matlab through get_param(model, 'SimulationTime').(Note: I only try that when the simulation is paused)
The used solver is ode23tb with an automatic step size which results in my case to being 60.
I expect the simulation time that is displayed in Simulink and right now I am handling it by simply substracting the 60 in Matlab.
But as the step size is automatically chosen there is no guarantee that this is correct and also there might be other downsides I am not aware of?
Is there a way to avoid this and am I not taking possible side effects into account?
Kind regards.

Antworten (0)

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by