lab03_sol_su09

lab03_sol_su09 - ECE220 Problem Lab #3 Getting practice...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ECE220 Problem Lab #3 Getting practice with MATLAB programming, complex numbers and functions I. Basic concepts in complex numebrs Question 1: | z | = 2 p (2) z = 4 (1) Question 2: One example of a complex number in the third quadrant is: z =- 1- j | z | = p (2) z = 5 4 (2) II. Basic operations with complex numbers Solution to Problem 4.14 Additions and subtractions are easiest to compute using cartesian form. For multiplications and divisions, use exponential form. Begin by writing z 1 and z 2 in exponential AND cartesian form. z 1 = 2 e j/ 3 = 1 + p (3) j z 2 = 3 e j/ 4 = 3 p (2) + 3 p (2) j (3) 1 z 4 = z 1- z 2 = 1 . 1870 e- j 2 . 8075 (4) z 6 = z 1 /z 2 = 2 3 e j/ 12 (5) z 8 = z 2 1 = 4 e j 2 / 3 (6) z 10 = 3 z 1 + 2 z 2 = 11 . 8973 e j . 9163 (7) Solution to Problem 4.19 Example matlab code is given by function main z1 = 2+j*2; z2 = -3*exp(pi/6*j); z3 = conj(z1) - z2 exp_form(z3); z4 = conj(z2)/z1 exp_form(z4); z5 = z1 - conj(z2) exp_form(z5); z6 = conj(z1) + 2*conj(z2) exp_form(z6); 2 function f = exp_form(z) % function to obtain the exponential form of a complex number z magnitude_z = abs(z); % computes magnitude of z angle_z = angle(z); % computes angle of z fprintf(Magnitude: %5.4f, Angle: %4.4f\n,magnitude_z,angle_z); % prints the output to the matlab command window % %5.4f prints 5 digits before and 4 digits after the decimal point z 1 = 2 + j 2 = 2 2 + 2 2 e j arctan 2 2 = 2 . 8284 ej 4 z 2 =- 3 e j 6 =- 3( cos ( 6 + j sin ( 6 )) =- 3( 3 2 + j 1 2 ) =- 2 . 598- j 1 . 5 1. z 3 = z 1- z 2 = (2- j 2)- (- 2 . 598- j 1 . 5) = 4 . 5981- j . 5 2. z 4 = z 2 /z 1 =- 3 e- j 6 / 2 . 8284 e j 4 =- 1 . 0606 e- j 5 12 3. z 5 = z 1- z 2 = 2+ j 2- (- 2 . 598+ j 1 . 5) = 4 . 5981+ j . 5 = 4 . 598...
View Full Document

Page1 / 11

lab03_sol_su09 - ECE220 Problem Lab #3 Getting practice...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online