马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
clear
xs=2*0.287;
fid=fopen('c\\:临时文件\\:EL centro','r');
dzhbo=fscanf(fid,'%f');
ag=dzhbo*0.01*xs;
dt=0.02;
ndzh=400;
cn=3;
m0=[2.762 2.760 2.300]*1e+3;
k0=[2.485 1.921 1.522]*1e+5;
l=diag(ones(cn));
m=diag(m0);
[ik]=matrixju(k0,cn);
[x,d]=eig(ik,m);
d=diag(sqrt(d));
for i=1:cn;
[d1(i),j]=min(d);
xgd(:,i)=x(:,j);
d(j)=max(d)+1;
end
w=d1;
x=xgd;
a1=2*w(1)*w(2)*(0.05*w(2)-0.07*w(1))/(w(2)^2-w(1)^2);
a2=2*(0.07*w(2)-0.05*w(1))/(w(2)^2-w(1)^2);
for j=1:cn
x(:,j)=x(:,j)/x(cn,j);
znb0(j)=(a1+a2*w(j)^2)/2/w(j);
zhcan(j)=(x(:,j))'*m*l/((x(:,j))'*m*x(:,j));
[dlt(j,:),dltacceler(j,:)]=zxzj(znb0(j),w(j),ag);
end
for i=1:cn;
disp1=0;
accel1=0;
for j=1:cn
disp0=zhcan(j)*dltacceler(j,:)*x(i,j);
accel0=zhcan(j)*dltacceler(j,:)*x(i,j);
disp1=disp1+disp0;
accel1=accel1+accel0;
end
disp(i,:)=disp1;
accel(i,:)=accel1;
end
t=0:dt:ndzh*dt;
subplot(2,2,1)
plot(t,disp(3,:)*1e+3,'b')
subplot(2,2,2)
plot(t,accel(3,:),'g')
subplot(2,2,3)
plot(t,dzhbo,'r') |