Appendix C
Complex Number Operations with MATLAB

C.1 Addition

(C.1)equation

C.2 Multiplication

(C.2a)equation
(C.2b)equation

C.3 Division

(C.3a)equation
(C.3b)equation

C.4 Conversion between Rectangular Form and Polar/Exponential Form

(C.4)equation

Here, r and θ are referred to as the absolute value and argument or phase angle of complex number ar+jai, respectively, and j is the unit imaginary number images.

C.5 Operations on Complex Numbers Using MATLAB

If we do not use i and j for any other purpose, they represent the basic imaginary unit images by default. Try typing the following statements into the MATLAB Command Window.

>>c1= 1+2i; c2= 3-4i;
>>c1*c2 % multiplication of complex numbers
>>c1/c2 % division of complex numbers
>>r=abs(c2) % absolute value of the complex number c2
>>sqrt(real(c2)^2+imag(c2)^2) % equivalent to the absolute value
>>th=angle(c2) % phase angle of the complex number c2 in radians
>>atan2(imag(c2),real(c2)) % equivalent to the phase angle
>>imag(log(c2)) % equivalent to the phase angle
>>th*180/pi % radian-to-degree conversion
>>r*exp(j*th) % polar-to-rectangular conversion
   ans = 3.0000 - 4.0000i
>>C= [1+i 1-2i; -1+3i -1-4i] % a complex matrix
   C = 1.0000 + 1.0000i  1.0000 - 2.0000i
      -1.0000 + 3.0000i -1.0000 - 4.0000i
>>C1= C' % conjugate transpose
   C1 = 1.0000 - 1.0000i -1.0000 - 3.0000i
        1.0000 + 2.0000i -1.0000 + 4.0000i
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.202.27