HW3 #2 - r = abs(z1 z1conj = r exp-j*theta z1msq = z1...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 %Engineering 6, Spring 2004, Problem 3.2 %Ryan Uy, 2509 %Section B05, Tues. 3-4 format short disp('a)') %Set value of z1, x1, and y1, and display x1 and y1 z1 = 2 + 6j x1 = real(z1) y1 = imag(z1) disp('b)') %Set value of z2, r2, and theta2, and display r2 and theta2 z2 = -3 + 4j r2 = abs(z2) theta2 = angle(z2) disp('c)') %Set and display value for z3 z3 = 3 * 2^(1/2) * exp(-pi*j/4) disp('d)') %Compute complex conjugate of z1, then compute magnitude theta = angle(z1)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: r = abs(z1) z1conj = r * exp(-j*theta) z1msq = z1 * z1conj z1mag = sqrt( z1msq) disp('e)') %Compute z4 and z5 z4 = z2 * z3 z5 = z4 / z1 disp('f)') disp('(See Plot)') %Plot each point z1, z2, and z3 accordingly axis([-5 5 -7 7]) grid off box off hold on plot(z1,'r.') plot(z2,'bo') plot(z3,'gs') text(real(z1)-0.3,imag(z1)-0.5,'num1') text(real(z2)-0.3,imag(z2)-0.5,'num2') text(real(z3)-0.3,imag(z3)-0.5,'num3')...
View Full Document

This note was uploaded on 01/22/2011 for the course ENG 006 taught by Professor Lagerstrom during the Spring '06 term at UC Davis.

Ask a homework question - tutors are online