资源简介
单自由度中心差分法MATLAB实现,只做了位移图,速度和加速度图下载者可自行绘制
代码片段和文件信息
%%%%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;
评论
共有 条评论