Skip to content

Abs

The Abs block replaces each input value with its magnitude.

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.

None.

For input x = -3.5, the output is y = 3.5.