User`s guide
Sample and Hold
5-383
5Sample and Hold
Purpose Sample and hold an input signal.
Library Signal Operations
Description 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. If 
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. The trigger event is specified by the 
Trigger type pop-up menu, and can be one of the following:
•
Rising edge triggers the block to acquire the signal input when the trigger 
input rises from zero to a positive value.
•
Falling edge triggers the block to acquire the signal input when the trigger 
input falls from zero to a negative value.
•
Either edge triggers the block to acquire the signal input when the trigger 
input either rises from zero to a positive value or falls from zero to a negative 
value. 
The block’s output prior to the first trigger event is specified by the 
Initial 
condition
 parameter. If 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. If 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. 
Dialog Box
Trigger type
The type of event that triggers the block to acquire the input signal.










