Digital Clock
Outputs the simulation time at the specified interval.
Description
The Digital Clock block outputs the simulation time only at times that are multiples of the specified interval. At all other times, the block holds the previous value in the output. To control the accuracy of this block, use the Sample time parameter in the block dialogue box.
Use this block rather than the Clock block (which outputs continuous time) when you need the current simulation time in a discrete system.
Parameters
Sample time - interval between calculation steps
1.0 (by default)
| scalar
Specify the interval between calculation steps as a non-negative number.
Do not specify a continuous calculation step 0
or [0,0]
. Also, avoid specifying -1
(calculation step inheritance) because this block is the source.
Block parameter |
|
Value |
|
By default |
|