資源簡介
單自由度中心差分法MATLAB實現(xiàn),只做了位移圖,速度和加速度圖下載者可自行繪制
代碼片段和文件信息
%%%%central?difference?methrod
clc
clear?all
close?all
%%%%intial?values?of?the?system
m=0.2533;
c=0.1592;
k=10;
%%%%the?expression?of?excitation
syms?t
p=10*sin(pi*t/0.6);
%%%%intial?caculation
t0=0.6;?????%the?end?of?the?excitation
total=1.0;???%totla?caculation?time
dt=0.1;?????%time?step
n=total/dt;
n1=t0/dt;
u1=0;
v1=0;
a1=(subs(p0)-c*v1-k*u1)/m;
uu=u1-dt*v1+0.5*dt^2*a1;
keq=m/dt^2+c/2/dt;
評論
共有 條評論