example1 - if (phi(i,1) < 0) phi(i,1) =...

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

View Full Document Right Arrow Icon
% This program calculates magnification factor and phase angle % at different frequency, and print the function values. % m = 1; c = 2; k = 100; k omega_n = sqrt(k/m); zeta = c/sqrt(k*m); z omega = [0:0.5:30]'; for i = 1:61 r(i) = omega(i)/omega_n; X(i,1) = 1/sqrt((1-r(i)^2)^2+(2*zeta*r(i))^2); phi(i,1) = atan(2*zeta*r(i)/(1-r(i)^2));
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: if (phi(i,1) < 0) phi(i,1) = phi(i,1)+pi; end end e disp('Frequency OMEGA MF X Angle PHI'); disp([omega X phi]); d plot(r,X) xlabel('Normalized frequency r') ylabel('Magnitude X') figure(2) plot(r,phi) xlabel('Normalized frequency r') ylabel('Phase Phi')...
View Full Document

This note was uploaded on 06/29/2011 for the course MAE 315 taught by Professor Wu during the Spring '08 term at N.C. State.

Ask a homework question - tutors are online