Using Simulink    

Sample Time

The Sample time parameter sets the sample time at which a discrete block's states are updated. Normally, the sample time is set to a scalar variable; however, it is possible to specify an offset time (or skew) by specifying a two-element vector in this field.

For example, specifying the Sample time parameter as the vector [Ts,offset] sets the sample time to Ts and the offset value to offset. The discrete block is updated on integer multiples of the sample time and offset values only

where n is an integer and offset can be positive or negative, but less than the sample time. The offset is useful if some discrete blocks must be updated sooner or later than others.

You cannot change the sample time of a block while a simulation is running. If you want to change a block's sample time, you must stop and restart the simulation for the change to take effect.


 Modeling and Simulating Discrete Systems Purely Discrete Systems