Dear all,
I am experiencing some problems using a Simulink model with a fixed step discrete time solver (for example 0.01 seconds). The model simply consists of 2 blocks: one "From Workspace" block ("interpolate data" option not enabled), and one "To Workspace" block ("Save format" option set to "Structure with time"). If I run the simulation and I look to the time field of the data saved to workspace, I can see that the time step is not always fixed. It is sometimes lower or greater than 0.01 (sometimes 0.0099999999999, other times 0.010000000001). If I don't want to use the "interpolate data" option, this means that I get an output that it is different from input (i.e. I get some input samples repeated on output, and others that are skipped). The "funny" thing is that this behavior depends on the number of samples of the input variable.
Why am I getting this jitter on the time step? Shouldn't it be supposed to be fixed? Is there any option to force it to exactly what I set on the solver options tab?
Thank you for any help.
Kind regards,
Alberto
Best Answer