接着上面的程序
e1x=e*cos(alf)
e1y=e*sin(alf)
e2x=(2*L/thick)*e*cos(alf)
e2y=(2*L/thick)*e*sin(alf)
Ky1x=sumy/e1x
Ky2x=sumy/e2x
Kx1y=sumx/e1y
Kx2y=sumx/e2y
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
w=1000;m=1.5;l=219;a=109;b=110;D=49.1;k1=2.5;k2=0.01;k3=249.33;k4=203.24;k5=1.25e+3;k6=1.01e+3;
j1=pi*D^4/32;
j2=pi*D^4/64;
M=[m*b/l,m*a/l,0,0;0,0,m*b/l,m*a/l;-j2/l,j2/l,0,0;0,0,-j2/l,j2/l];
C=[k3*k2,k4*k2,0,0;0,0,k3*k2,k4*k2;-a*k3*k2,b*k4*k2,w*j1/l,-w*j1/l;-w*j1/l,w*j1/l,-a*k3*k2,b*k4*k2];
K=[(k5+k3*k1+Ky1x),(k6+k4*k1+Ky2x),0,0;0,0,(k5+k3*k1+Kx1y),(k6+k4*k1+Kx2y);-a*(k3*k1+k5+Ky1x),b*(k6+k4*k1+Ky2x),0,0;0,0,-a*(k3*k1+k5+Kx1y),b*(k6+k4*k1+Kx2y)];
I=eye(4);
mm=zeros(4);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%转换为标准特征值问题
G=[mm,I;-inv(M)*K,-inv(M)*C];
cri=eig(G)
pp=imag((cri));
wn=(abs(imag(cri)));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
A1=[-wn(1,1)^2*M(1,2)+...
i*wn(1,1)*C(1,2)+K(1,2),...
-wn(1,1)^2*M(1,3)+i*wn(1,1)...
*C(1,3)+K(1,3),-wn(1,1)^2*...
M(1,4)+i*wn(1,1)*C(1,4)+K(1,4);...
-wn(1,1)^2*M(2,2)+i*wn(1,1)*C(2,2)+K(2,2), -wn(1,1)^2*M(2,3)+i*wn(1,1)*C(2,3)+K(2,3), -wn(1,1)^2*M(2,4)+i*wn(1,1)*C(2,4)+K(2,4);...
-wn(1,1)^2*M(3,2)+i*wn(1,1)*C(3,2)+K(3,2),-wn(1,1)^2*M(3,3)+i*wn(1,1)*C(3,3)+K(3,3),-wn(1,1)^2*M(3,4)+i*wn(1,1)*C(3,4)+K(3,4);...
-wn(1,1)^2*M(4,2)+i*wn(1,1)*C(4,2)+K(4,2),-wn(1,1)^2*M(4,3)+i*wn(1,1)*C(4,3)+K(4,3),-wn(1,1)^2*M(4,4)+i*wn(1,1)*C(4,4)+K(4,4)]
B1=-[-wn(1,1)^2*M(1,1)+i*wn(1,1)*C(1,1)+K(1,1); -wn(1,1)^2*M(2,1)+i*wn(1,1)*C(2,1)+K(2,1);-wn(1,1)^2*M(3,1)+i*wn(1,1)*C(3,1)+K(3,1); -wn(1,1)^2*M(4,1)+i*wn(1,1)*C(4,1)+K(4,1)]
X(:,1)=pinv(A1)*(B1)
input('The program is over!')
运行后总有这样的错误:
??? Error using ==> svd
Too many input arguments.
Error in ==> D:\MATLAB6p5\toolbox\matlab\matfun\pinv.m
On line 20 ==> [U,S,V] = svd(A,0);
Error in ==> D:\MATLAB6p5\work\MATLAB\练习\zhenxing4.m
On line 86 ==> X(:,1)=pinv(A1)*(B1) |