ABS

From STX Wiki
Jump to navigationJump to search

Absolute value.

[SPU ABS a OUT y]
a
a scalar or a vector
y
same type as a


Compute the absolute value of input A. If A is a number: y = |A| If A is a vector: y[i] = |A[i]|

Usage:

ABS A

Inputs:
A
A number or vector.
Outputs:
Y
A number or vector (same as type of A).

Navigation menu

Personal tools