You are here: Home Academic Course Info docs ucme663 v3_001.m
Document Actions

v3_001.m

by zopeown last modified 2007-04-23 12:02
% v3_001.m % % This is a script file to solve a sdof system % given the mass, damping and stiffness terms % in dimensionless units. The output includes % poles, residues (modal coefficients) and both % time and frequency domain plots of the impulse % frequency response functions. % %********************************************************************** % Author: Randall J. Allemang % Date: 18-Apr-94 % Structural Dynamics Research Lab % University of Cincinnati % Cincinnati, Ohio 45221-0072 % TEL: 513-556-2725 % FAX: 513-556-3390 % E-MAIL: randy.allemang@uc.edu %********************************************************************* % clg, clear plt=input('Store plots to file (Yes=1): (0)');if isempty(plt),plt=0;end; mass=input('Mass value: (10)');if isempty(mass), mass=10;end; stiff=input('Stiffness value: (16000)');if isempty(stiff),stiff=16000;end; damp=input('Damping value: (10)'); if isempty(damp),damp=10;end; f=linspace(0,50,500); H=1.0./((-mass.*f.*f+stiff)+j.*damp.*f); plot(f,real(H)) pause plot(f,imag(H)) pause clear f,H; pause a=[mass,damp,stiff] b=[0,0,1] [r,p,k]=residue(b,a) residue = r(1) lambda=p(1) whos pause(2) t=linspace(0,5,500); xt=residue./2*exp(lambda.*t) + residue'./2*exp(lambda'.*t); plot(t,xt) xlabel('Time (Sec.)'),ylabel('Amplitude'),grid if plt==1,print -deps v2_001a,end; pause clear t,xt; f=linspace(0,50,500); xf=residue./(j.*f-lambda) + residue'./(j.*f-lambda'); plot(f,abs(xf)) xlabel('Frequency (Hz)'),ylabel('Magnitude'),grid if plt==1,print -deps v2_001b,end; pause semilogy(f,abs(xf)) xlabel('Frequency (Hz)'),ylabel('Log Magnitude'),grid if plt==1,print -deps v2_001c,end; pause plot(f,360./(2.*pi).*angle(xf)) xlabel('Frequency (Hz)'),ylabel('Phase (Deg)'),grid if plt==1,print -deps v2_001d,end; pause plot(f,360./(2.*pi).*angle(xf)) xlabel('Frequency (Hz)'),ylabel('Phase (Deg)'),grid if plt==1,print -deps v2_001e,end; pause plot(f,real(xf)) xlabel('Frequency (Hz)'),ylabel('Real'),grid if plt==1,print -deps v2_001f,end; pause plot(f,imag(xf)) xlabel('Frequency (Hz)'),ylabel('Imaginary'),grid if plt==1,print -deps v2_001g,end;