Asked by Eric Cope
on 29 Jan 2013

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

http://i.imgur.com/NC37E5n.png http://i.imgur.com/S7XTQZh.png

Opportunities for recent engineering grads.

## 4 Comments

## Azzi Abdelmalek (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/60282#comment_125917

Your image is not complete. What is the sample time of rate transition block?

## Eric Cope (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/60282#comment_126102

The sample rate changes from 208MHz to 104MHz. Note that I received the same kind of data with or without the rate transition block.

## Ryan G (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/60282#comment_127344

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?

## Chandrakanth (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/60282#comment_127723

@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.