📄 vtb3_1.m
字号:
function vtb3_1(m,c,k,Fo,tf)%VTB3_1 Impulse response of a SDOF system.% VTB3_1(m,c,k,Fo,tf) plots the response of the system to an% impulse of magnitude Fo. The input variables are the mass m,% the stiffness k, and the damping c. The total time of the % response is tf.% VTB3_1(zeta,w,fo,tf) plots the response of the system % described by the damping ratio zeta and the % undamped natural frequency w to a normalized impulse (Fo/m) % of magnitude fo. if nargin==5 w=sqrt(k/m);zeta=c/2/w/m;fo=Fo/m; else tf=Fo;zeta=m;w=c;fo=k;endt=0:tf/300:tf;wd=w*sqrt(1-zeta^2);x=fo/wd.*exp(-zeta*w*t).*sin(wd*t);aa=version;ll=length(aa);plot(t,x)grid onendxlabel('Time')ylabel('Displacement')title('Displacement versus Time')
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -