%时间位移曲线 卷积积分法
clear
t1=1;
t2=2;
T=10;
c=3;
m=10;
k=10;
wn=sqrt(k/m);
zat=c/(2*m*wn);
wd=sqrt(1-(zat*zat))*wn;
syms tao t;
v1=5*tao*(1/(m*wd))*exp(-zat*wn*(t-tao))*sin(wd*(t-tao));
v2=(10-5*tao)*(1/(m*wd))*exp(-zat*wn*(t-tao))*sin(wd*(t-tao));
v01=int(v1,tao,0,t);
v02=int(v1,tao,0,t1);
v03=int(v2,tao,t1,t);
v04=int(v2,tao,t1,t2);
t01=0:0.01:t1;
x1=subs(v01,{t},{t01});
t02=t1:0.01:t2;
x2=subs(v02+v03,{t},{t02});