| Signal Processing Blockset™ | ![]() |
Signal Operations
dspsigops
The Sample and Hold block acquires the input at the signal port
whenever it receives a trigger event at the trigger port (marked by
). The block
then holds the output at the acquired input value until the next triggering
event occurs. When the acquired input is frame based, the output is
frame based; otherwise, the output is sample based.
The trigger input must be a sample-based scalar with sample rate equal to the input frame rate at the signal port. You specify the trigger event in the Trigger type pop-up menu:
Rising edge triggers the block to acquire the signal input when the trigger input rises from a negative value or zero to a positive value.
Falling edge triggers the block to acquire the signal input when the trigger input falls from a positive value or zero to a negative value.
Either edge triggers the block to acquire the signal input when the trigger input either rises from a negative value or zero to a positive value or falls from a positive value or zero to a negative value.
You specify the block's output prior to the first trigger event using the Initial condition parameter. When the acquired input is an M-by-N matrix, the Initial condition can be an M-by-N matrix, or a scalar to be repeated across all elements of the matrix. When the input is a length-M 1-D vector, the Initial condition can be a length-M row or column vector, or a scalar to be repeated across all elements of the vector.
If you select the Latch (buffer) input check box, the block outputs the value of the input from the previous time step until the next triggering event occurs. To use this block in a loop, select this check box.

The type of event that triggers the block to acquire the input signal.
The block's output prior to the first trigger event.
If you select this check box, the block outputs the value of the input from the previous time step until the next triggering event occurs.
| Port | Supported Data Types |
|---|---|
Input |
|
Trigger |
|
Outputs |
|
| Downsample | Signal Processing Blockset |
| N-Sample Switch | Signal Processing Blockset |
![]() | RMS | Scalar Quantizer (Obsolete) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |