Sample and Hold
(To be removed) Sample first input and hold its value based on value of second input
The Specialized Power Systems library will be removed in R2026a. Use the Simscape™ Electrical™ blocks and functions instead. For more information on updating your models, see Upgrade Specialized Power System Models to use Simscape Electrical Blocks.
Library
Simscape / Electrical / Specialized Power Systems / Control
Description
The Sample and Hold block outputs the In input
signal as long as S input signal is true. The block
holds the output when the S input signal becomes
false.
Parameters
- Initial condition
Specify the initial value of the output. Default is
0.- Sample time
Specify the sample time of the block, in seconds. Set to
0to implement a continuous block. Default is0.
Inputs and Outputs
InThe signal.
SThe control signal, which must be a Boolean.
OutThe sampled signal.
Characteristics
| Direct Feedthrough | Yes |
| Sample Time | Specified in the Sample Time parameter |
| Scalar Expansion | Yes |
| Dimensionalized | Yes |
| Zero-Crossing Detection | No |
Version History
Introduced in R2013a