Discrepancy in Simulation Time
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!