<< shiftdim | Elementary functions | size >> |
R = sign(M) |
a variable
result of sign.
sign find the sign function of a number.
-1 if the corresponding element of M is less than 0.
0 if the corresponding element of M equals 0.
1 if the corresponding element of M is greater than 0.
If input argument is a complex number, sign computes M ./ abs(M).
V = [-1 0 15 NaN Inf];
sign(V)
Version | Description |
---|---|
1.0.0 | initial version |
Allan CORNET