% % Written by: % -- % John L. Weatherwax 2009-04-21 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- clc; close all; clear; M_q = -0.568; M_alpha = -17.98; % negated from books number L_alpha_over_V = 1.237; M_dE = -0.175; % negated from books number L_dE_over_V = 0.001; w_n = sqrt( -M_alpha ) xi = ( 0.5/(w_n) ) * ( L_alpha_over_V - M_q ) Nw = 1000; wArray = linspace(0,+70,Nw); A = zeros(1,Nw); P = zeros(1,Nw); for wi = 1:Nw, w = wArray(wi); vn = ( i * w + L_alpha_over_V ) * M_dE - M_alpha * L_dE_over_V; vd = -w^2 + 2 * i * xi * w_n * w + w_n^2; v = vn/vd; A(wi) = 20*log(abs(v)); P(wi) = angle(v)*(180/pi); end figure; plot( wArray, A, '-' ); xlabel('omega (radians)'); ylabel('20 log(A(w))'); %saveas( gcf, '../../WriteUp/Graphics/Chapter2/sect_6_prob_1_part_c_N_d_A.eps', 'epsc' ); figure; plot( wArray, P, '-' ); xlabel('omega (radians)'); ylabel('phi(w) (deg)'); %saveas( gcf, '../../WriteUp/Graphics/Chapter2/sect_6_prob_1_part_c_N_d_P.eps', 'epsc' );