abs
Absolute value or modulus.
| Library |
|
Syntax
Function call
-
Y = abs(X)— returns the absolute value of each element of the input argumentX. IfX— complex, thenabs(X)returns its module. For more information, see the Absolute value and The module of a complex number sections.
Arguments
Input arguments
# X — input data
+
scalar | vector | the matrix | multidimensional array
Details
Input data specified as a scalar, vector, matrix, or multidimensional array. If X — complex, then it should have the type Float32 or Float64.
| Типы данных |
|
| Support for complex numbers |
Yes |
Examples
The absolute value of the scalar
Details
Calculate the absolute value of the number −5.
import EngeeDSP.Functions: abs
y=abs(-5)
5