📄 v2_052.m
字号:
% v2_052.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 Damped 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;
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_052a,end;
pause
clg; clear t; clear 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_052b,end;
pause
clg
plot(f,imag(xf))
xlabel('Frequency (Rad/Sec)'),ylabel('Imaginary'),grid
if plt==1,print -f1 -deps v2_052c,end;
axis([1,2,3,4]);axis;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -