Saturation
The Saturation block limits its input to the closed interval [lower_limit, upper_limit].
Behavior
Section titled “Behavior”y = limit(x, lower_limit, upper_limit)
For each value, outputs the lower limit below the range, the upper limit above it, and the input inside it.
| Port | Direction | Type |
|---|---|---|
| 0 | Input | Numeric scalar or fixed-size numeric array |
| 0 | Output | Same type as input |
Limits are numeric literals converted to the input type; arrays are clamped element by element.
Literal bounds with lower_limit > upper_limit are rejected; runtime bounds must preserve that ordering.
Parameters
Section titled “Parameters”| Parameter | Type | Default |
|---|---|---|
lower_limit |
Number | -1.0 |
upper_limit |
Number | 1.0 |
Example
Section titled “Example”With limits -1.0 and 1.0 and input x = 2.5, the output is y = 1.0.