lab03_sol_su09

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

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

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

View Full Document

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

View Full Document
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

## This note was uploaded on 08/24/2009 for the course ECE 220 taught by Professor Nilson during the Summer '08 term at N.C. State.

### Page1 / 11

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

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

View Full Document
Ask a homework question - tutors are online