You are here: Home Academic Course Info docs ucme662 v2_011.m
Document Actions

v2_011.m

by zopeown last modified 2007-04-23 12:00
% v2_011.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. % % SDOF System % Figures for UC-SDRL-CN-20-263-662, Chapter 2 %********************************************************************** % 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 %********************************************************************* % clear,clg 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: (4)'); if isempty(stiff),stiff=4;end damp=input('Damping value: (2)'); if isempty(damp),damp=2;end mass,stiff,damp a=[mass,damp,stiff]; b=[0,0,1]; [r,p,k]=residue(b,a); residu=r(1); lambda=p(1); t=linspace(0,60,500); xt=residu./2*exp(lambda.*t) + residu'./2*exp(lambda'.*t); axis([0,60,-0.1,0.1]) plot(t,xt) xlabel('Time (Sec.)'),ylabel ('Amplitude'),grid if plt==1,print -f1 -deps v2_011a,end; pause clg clear t,xt; f=linspace(0,3,500); xf=residu./(j.*f-lambda) + residu'./(j.*f-lambda'); axis([0,3,-1.0,1.0]) plot(f,real(xf)) xlabel('Frequency (Rad/Sec)'),ylabel('Real'),grid if plt==1,print -f1 -deps v2_011b,end; pause clg plot(f,imag(xf)) xlabel('Frequency (Rad/Sec)'),ylabel('Imaginary'),grid if plt==1,print -f1 -deps v2_011c,end; axis([1,2,3,4]);axis;