SIGN function
Description
Sign value. SIGN(x) returns a number that indicates the sign of x: -1 if x is negative; 0 if x equals 0; or 1 if x is positive.
The argument x can be a real number or a matrix. When it is a matrix, the function returns a matrix with the same dimensions and with the SIGN function applied to all elements.
Examples
SIGN(0) equals 0
SIGN(-2.23) equals -1