7.4.4 Modulus and argument of a complex number
A complex number z can be written in polar form reiθ,
where r is the modulus and θ is the argument. The angle
θ is only determined up to a multiple of 2π; there will be
a unique value in the interval (−π,π], the value in this
interval is called the principal value of the argument.
The abs and
arg commands find the modulus and
argument of a complex number, respectively (see also
Section 8.3.2).
-
abs takes
z, a complex number.
- abs(z) returns the modulus |z|.
- arg takes
z, a complex number.
- arg(z) returns the principal value of the argument of z.
Examples