Simulink Saving to Workspace Time is not monotonically increasing

1 view (last 30 days)
I am running a simulink simulation using the fixed-step discrete solver. I've even specified the fixed-step size. I save some data via a "To Workspace" block (I've used the Scope to save to workspace as well with equivalent results). When I look at the time data in the object, the time is not monotonically increasing.
The time value is constant for 5-10 samples, then continues. Any ideas why this happens?
Thanks, Eric
  4 Comments
Ryan G
Ryan G on 5 Feb 2013
What is the sample time in that 1/z block? What is the sample time in the to workspace block? What is the save format in the to workspace block?
If it is sampling faster than it is receiving data, it will repeat values in the data.
cr
cr on 7 Feb 2013
Edited: cr on 7 Feb 2013
@Ryan G: Even if sampling is faster than update, data saved will be monotonically increasing although not strictly because of repeat values.
@Eric Cope: Do you mean monotonically increasing or strictly monotonically increasing? If you meant latter, its expected as Ryan explains. If its former, its intriguing - upload your model.

Sign in to comment.

Answers (0)

Categories

Find more on Simulink Functions in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!