SampleAndHold('Expression','Sample')

Arguments

'Expression'

Signal or expression

'Sample'

Parameter that determines whether the function follows the signal (1) or holds the last measured value (0). 'Sample' can be a condition itself or be determined by a different function.

Description

This function is a sample-hold function. The output follows 'Expression' when 'Sample' = TRUE. It remains unchanged when 'Sample' = FALSE.