7.4.2 Real and imaginary parts of a complex number
The re (or real)
and im (or imag)
commands find the real and imaginary parts of a complex number.
-
re takes
a, a complex number (or point).
- re(a) returns the real part of the
complex number a (or the projection of the point a onto the x axis).
- im takes
a, a complex number (or point).
- im(a) returns the
imaginary part of the complex number a (or the projection of the
point a onto the y axis).
Examples