Discrepancy in Simulation Time

1 回表示 (過去 30 日間)
Fabian Pagel
Fabian Pagel 2019 年 2 月 14 日
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.

回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by