Download Sysquake Remote User Manual

Transcript
Tutorial
21
ans =
-8.3585+18.2637j
> log(-8.3585+18.2637j)
ans =
3+2j
To get the real or imaginary part of a complex number, use the functions real or imag, respectively:
> real(2+3j)
ans =
2
> imag(2+3j)
ans =
3
Complex numbers can be seen as vectors in a plane. Then addition
and subtraction of complex numbers correspond to the same operations applied to the vectors. The absolute value of a complex number,
also called its magnitude, is the length of the vector:
> abs(3+4j)
ans =
5
> sqrt(3ˆ2+4ˆ2)
ans =
5
The argument of a complex number is the angle between the x axis
("real axis") and the vector, counterclockwise. It is calculated by the
angle function.
> angle(2+3j)
ans =
0.9828
The last function specific to complex numbers we will mention here is
conj, which calculates the conjugate of a complex number. The conjugate is simply the original number where the sign of the imaginary
part is changed.
> conj(2+3j)
ans =
2-3j
Real numbers are also complex numbers, with a null imaginary part;
hence
> abs(3)
ans =