ECE 024 Lab Activity 2 - Forms of Complex Numbers
ECE 024 Lab Activity 2 - Forms of Complex Numbers
2
Different Forms of Complex Numbers
1. Objective(s):
This activity aims to use MATLAB in converting complex numbers from one form to another.
2. Intended Learning Outcomes (ILOs):
At the end of this activity, the student shall be able to
1. Use MATLAB to easily convert complex numbers from one form to another.
2. Use MATLAB to plot complex numbers.
3. Discussion
Employing rectangular coordinate axes, the complex number a+ jb is represented by the point whose
coordinates are (a,b). This coordinate system is also known as Argand diagram, named after Jean Robert Argand.
To plot numbers (3 + j2), (-2 + j5) and (-1 – j), we can write the following code in Matlab.
% You can define the limits of the plot [xmin xmax ymin ymax]
axis([-3 4 -2 6])
Once the polar form has been solved, it is easy to get the trigonometric and exponential forms as we will be using
the same variables.
Trigonometric form of complex numbers is equal to z=r (cosθ+ jsinθ).
Lastly, to express a complex number in its exponential form, we just need to make use of Euler’s constant. The
exponential form of a complex number is written as z=r e jθ .
In MATLAB, we can effortlessly know the modulus and angle, expressed in radians, of any number by using the
abs and angle instructions. Example:
>> a = 3 – j4
>> magnitude = abs(a)
>> theta = angle(a)
a=
3.0000 – 4.0000i
magnitude =
5
theta =
-0.9273
5− j 2
π
6∠
3
2(cos 70 °+ jsin70 °)
jπ
3e 8
2. Using MATLAB, plot the complex numbers given in number 1 using plot. (Note: Be sure to use a different
color and style for each number.)
5. If x = 1, y = 2, find
a. z in rectangular form
b. z2 in rectangular form
c. the complex conjugate of z in rectangular form
d. the product of z and its complex conjugate
e. the magnitude r
f. the angle θ
g. z divided by its conjugate
5− j 2
π
6∠
3
2(cos 70 °+ jsin70 °)
jπ
3e 8
7. Using MATLAB, plot the complex numbers given in number 1 using plot. (Note: Be sure to use a different
color and style for each number.)
a. 5− j 2
π
b. 6 ∠
3
c. 2(cos 70 °+ jsin70 °)
jπ
d. 3 e 8
c. 2(cos 70 °+ jsin70 °)
jπ
d. 3 e 8
10. If x = 1, y = 2, find
h. z in rectangular form
i. z2 in rectangular form
l. the magnitude r
m. the angle θ
7. Conclusion:
8. Assessment:
jπ
1. Consider two complex numbers z =2 e 4 and z 2=−√ 3+ j.
1
Enter the complex numbers in Matlab, then plot them with zvect(), and also print them with zprint().
An x-y axis and the unit circle can be superimposed on your zvect() plot by doing the following: hold
on, zcoods, ucplot, hold off
Compute the conjugate z* and the inverse 1/z for both z1 and z2 and plot the results as vectors. In
Matlab, see help conj. Display the results numerically with zprint.
The function zcat() can be used to plot vectors in a “head-to-tail” format. Execute the statement
zcat([1+j,-2+j,1-2j]); to see how zcat() works when its input is a vector of complex numbers.
Compute z1z2 and z2/z1 and plot the answers using zvect() to show how the angles of z 1 and z2
determine the angles of the product and quotient. Use zprint() to display the results numerically.
COURSE:____________________________ MEMBERS:
______________________________________________
SECTION: ___________________________ ________________________________________________________
INSTRUCTOR: ____________________________ ________________________________________________________
EXPERIMENT NO.: ____________________ ________________________________________________________
TITLE:______________________________________________ ________________________________________________________
_
Evaluated by:
Printed Name and Signature of Faculty Member Date