下面程序本来要得到24*24的矩阵的,结果是3*3的矩阵,请问问题出在哪里?
下面程序本来要得到24*24的矩阵的,结果是3*3的矩阵,请问问题出在哪里?E=210E9;NU=0.3;
a=35/3;b=45/4;c=10;
A1=NU/(1-NU);A2=(1-2*NU)/(2*(1-NU));
A3=E*(1-NU)/((1+NU)-(1-2*NU));
x=[1.667,1.667,1.667,1.667,-10,-10,10,-10];
y=[-30,-18.75,-18.75,-30,-30,-18.75,-18.75,-30];
z=[20,20,10,10,20,20,10,10];
% Ke=zeros(24,24);
for i=1;8;
for j=1;8;
ei=x(i)/a;
ej=x(j)/a;
fi=y(i)/b;
fj=y(j)/b;
gi=z(i)/c;
gj=z(j)/c;
G11=b*b*c*c*ei*ej*(3+fi*fj)*(3+gi+gj)+A2*a*a*(3+ei*ej)*...
(3*b*b*gi*gj+fi*fj*(3*c*c+(b*b+c*c)*gi*gj));
G12=3*a*b*c*c*(A1*ei*fj+A2*fi*ej)*(3+gi*gj);
G13=3*a*b*b*c*(A1*ei*gj+A2*gi*ej)*(3+fi*fj);
G21=3*a*b*c*c*(A1*ej*fi+A2*fj*ei)*(3+gi*gj);
G22=a*a*c*c*fi*fj*(3+ei*ej)*(3+gi*gj)+A2*b*b*(3+fi*fj)*...
(3*a*a*gi*gj+ei*ej*(3*c*c+(a*a+c*c)*gi*gj));
G23=3*a*a*b*c*(A1*fi*gj+A2*gi*fj)*(3+ei*ej);
G31=3*a*b*b*c*(A1*gi*ej+A2*ei*gj)*(3+fi*fj);
G32=3*a*a*b*c*(A1*gi*fj+A2*fi*gj)*(3+ei*ej);
G33=a*a*b*b*gi*gj*(3+ei*ej)*(3+fi*fj)+A2*c*c*(3+gi*gj)*...
(3*a*a*fi*fj+ei*ej*(3*b*b+(a*a+b*b)*fi*fj));
Ke(3*i-2,3*j-2)=A3/(72*a*b*c)*G11;
Ke(3*i-2,3*j-1)=A3/(72*a*b*c)*G12;
Ke(3*i-2,3*j)=A3/(72*a*b*c)*G13;
Ke(3*i-1,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