sgn

Returns the sign of real or complex value. For complex numbers, the result is x/|x|. Depending on input, function can return scalar, vector, matrix or complex number.

Arguments

  1. Real or complex value x

Output

Real or complex value

Examples

sgn