Functions > Utility Functions > Complex Number Functions
  
Complex Number Functions
Magnitude and Argument
Re(Z)—Returns the real part of Z.
Im(Z)—Returns the imaginary part of Z.
arg(z)—Returns the principal argument of z, between −π and π, including π. The argument is the value of θ when z is written as |z| · e^(i·θ).
The arg function is related to the polar angle functions.
Sign
csgn(z)—This function is used to determine in which half-plane (left or right) the complex-valued expression or number z lies. It returns the following results:
Argument
Result
z = 0
0
Re(z) > 0 or (Re(z) = 0 and Im(z) > 0)
1
Otherwise
−1
signum(z, [x])—This vectorized function returns the sign of a real or complex number. It returns the following results:
Argument
Result
z = 0
x
1 if x is omitted.
z ≠ 0
z/|z|
z and x can be any combination of scalar and vector.
If z and x are both vectors, then they must have the same dimension.
sign(x)—This function returns the sign of a real number. It returns the following results:
Argument
Result
x = 0
0
x > 0
1
Otherwise
−1
For a complex number argument, use csgn(z).
Arguments
Z is a real or complex scalar or matrix.
z is a real or complex scalar or vector.
x is a real scalar or vector.