ex5_6 - xlabel('Frequency (rad/sec)') ylabel('Angle X,...

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

View Full Document Right Arrow Icon
% Example 5.6 % This program uses advanced commands that will not % be introduced until later chapters % plot H wnh=40; w = 0:.5:100; H = wnh^2./((wnh^2-w.^2)+.707*2*wnh*j*w); clf subplot(211),plot(w,abs(H)); title(' Example 5.6'); xlabel('Frequency (rad/sec)') ylabel('|H|') subplot(212),plot(w,180*unwrap(angle(H))/pi); xlabel('Frequency (rad/sec)') ylabel('Angle H, degrees') pause % plot X w = 0:.5:100; wn1 = 10; %wn1 = input('wn1 '); wn2 = 70;% wn2 = input('wn2 '); zeta1 = .3; % zeta1 = input('zeta1 '); zeta2 = .03; % zeta2 = input('zeta2 '); X =wn1^2 ./(((wn1^2)-w.^2)+2*zeta1*wn1*j*w)*wn2^2./(((wn2^2)- w.^2)+2*zeta2*wn2*j*w); subplot(211),plot(w,abs(X)); title(' Example 5.6'); xlabel('Frequency (rad/sec)') ylabel('|X|') subplot(212),plot(w,180*unwrap(angle(X))/pi);
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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: xlabel('Frequency (rad/sec)') ylabel('Angle X, degrees') pause % % plot Y Y = H.*X; subplot(211),plot(w,abs(Y)); title(' Example 5.6'); xlabel('Frequency (rad/sec)') ylabel('|Y|') subplot(212),plot(w,180*unwrap(angle(Y))/pi); xlabel('Frequency (rad/sec)') ylabel('Angle Y, degrees') pause; % % % Time domain plots Xn1 = wn1^2;Xd1 = [1 2*zeta1*wn1 wn1^2]; Xn2 = wn2^2;Xd2 = [1 2*zeta2*wn2 wn2^2]; t=0:2/400:2; [Xn,Xd] = series(Xn1,Xd1,Xn2,Xd2); x = impulse(Xn,Xd,t); Hn = wnh^2 ; Hd = [1 2*.7*wnh wnh^2]; [Yn,Yd]=series(Xn,Xd,Hn,Hd); y = impulse(Yn,Yd,t); clf subplot(211),plot(t,x); xlabel('Time (sec)') ylabel('x(t)') subplot(212),plot(t,y); xlabel('Time (sec)') ylabel('y(t)') subplot(111)...
View Full Document

This note was uploaded on 03/24/2010 for the course CENG 4331 taught by Professor Maryrandolph-gips during the Fall '09 term at UH Clear Lake.

Page1 / 2

ex5_6 - xlabel('Frequency (rad/sec)') ylabel('Angle X,...

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

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