Abs
The Abs block replaces each input value with its magnitude.
Behavior
Section titled “Behavior”y = abs(x)
| Port | Direction | Type |
|---|---|---|
| 0 | Input | Numeric scalar or fixed-size numeric array |
| 0 | Output | Same type as input |
Arrays are processed element by element.
Parameters
Section titled “Parameters”None.
Example
Section titled “Example”For input x = -3.5, the output is y = 3.5.