HW6 sol - I? 17* 17 «J. 7M _ I 2 _ - H (’31-: gem; ,...

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

View Full Document Right Arrow Icon
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: I? 17* 17 «J. 7M _ I 2 _ - H (’31-: gem; , (fr-4; £34wa Ixeyzglo~g If 17 ff )9 :l' f “ I 'n c‘ «*1 - QMX IT - 49 {7/ fwxméx,77J§x,¢— xxwfif Xflfégrhgéaflcfl ‘5 n = ww L “)1 W 7 . ,...1 q1 gfiflimm mc-u SM)” fifww 01,;de (0 X (’1 MnXJ Pm, 31,, 33,39 Mazda: M M ‘ N=1000; d=(2*pi)/N: N1=N+1;' for n=1JN1 x(n)= —pi+d*(n—1); if (x(n) < 0) f8(n)=0: else fG(n)=x(n); end; 52=pi/4; for m=1:2 . 52: sZ+(cos(m*pi)—1)*cos(m*x(n))/(pi*m“2)—(1/m)*((—1)“m)*sin(m*x(n)): ‘_ en ; s3=sZ+(cos(3*pi)—1)*cos(3*x{n))/(pi*3“2)«(1/3)*((—1)“3)*sin{3*x(n)); 54:53+(cos(4*pi)—1)*cos(4*x(n))/(pi*4“2)—(l/4)*((—l)‘3)*sin(4*x(n)): f2(n)=52; f3(n)=53; f4(n)=s4; end: /\ plot(x,f9,'k—',x,f2,'k:',x,f3,'k—~',x,f4,'k—.') x1abe1('x+axis, Solid Line=function, dot=s,2, dash=S=3, dash-dot=5fi4') ylabel('y-axis') - yuaxis —4 —3 —2' _ _-1 0 1 2 3 4 ‘ X—aXIS, Solid ltnezfuncfion, dot=82. dash=83. dash—clot-Sl1 flaw $237 61 W- W M Hog X99} WWX—aK:'%(X-W)‘fi‘ 42% x999 «:9 32’; Typflflr w—m-n fl} Y=fa§:%@+flrfizmfi:w 17M M l/m #42? Y 145 7699mm" :81“) w :56?) 14‘ img Ms 43W #179 flaw/ame 7%“ ng9)%w/Zé) (ECWMMM % 2 iv ffmwcw VMYfiX 7:) £29,12me (a dry f a” f 1: favga’x —: %[F7v(wx (016W ' :1“ "/ ' F (m p)«n)a)< «4444 5 fififlombht—FfP—MflOW 49% "fl’ _ F. ‘ fly : afijpifiwm C%X+7'fl)dxt%j£6%)qpfi}qu< ahfflfiwf W "C! ‘ 6:569 M WAC/x _,. i f w / kn“???/zr X) W/k 97,? f ...
View Full Document

Page1 / 3

HW6 sol - I? 17* 17 «J. 7M _ I 2 _ - H (’31-: gem; ,...

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

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