qianen 发表于 2009-3-15 21:17

程序上的问题(求助)

syms s
mb=;
cb=*(10e4);
kb=*(10e8);
k=*(10e7);
c=*(10e5);
a=k+s*c;
b=a+kb+s*cb+s^2*mb;
c=kb+s*cb+s^2*mb;
d=a/b*c;
K=vpa(d,10);
m1=2.94e3;
m27=2.94e3;
mi=5.88e3;
li=0.4;
EJ=1.3514e11;
L=;
M=;
KXX=;
KXY=;
KYX=;
KYY=;
for i=1:27
    u11=[1,L(i),0,0;
      0,1,0,0;
      0,0,1,L(i);
      0,0,0,1];
    u21=[L(i)^2/(2*EJ),L(i)^3/(6*EJ),0,0;
      L(i)/(2*EJ),L(i)^2/(2*EJ),0,0;
      0,0,L(i)^2/(2*EJ),L(i)^3/(6*EJ);
      0,0,L(i)/(2*EJ),L(i)^2/(2*EJ)];
    u12=[-L(i)*(M(i)*s^2+KXX(i)),0,-L(i)*KXY(i),0;
      -(M(i)*s^2+KXX(i)),0,-KXY(i),0;
      -L(i)*KYX(i),0,-L(i)*(M(i)*s^2+KYY(i)),0;
      -KYX(i),0,-(M(i)*s^2+KYY(i)),0];
    u22=[1-(M(i)*s^2+KXX(i))*L(i)^3/(6*EJ),L(i),-KXY(i)*L(i)^3/(6*EJ),0;
      -(M(i)*s^2+KXX(i))*L(i)^2/(2*EJ),1,-KXY(i)*L(i)^2/(2*EJ),0;
      -KYX(i)*L(i)^3/(6*EJ),0,1-(M(i)*s^2+KYY(i))*L(i)^3/(6*EJ),L(i);
      -KYX(i)*L(i)^2/(2*EJ),0,-(M(i)*s^2+KYY(i))*L(i)^2/(2*EJ),1];
    T(:,:,i)=;
end
H=T(:,:,1);
for n=2:27;
    H=T(:,:,n)*H;
end
H
请问下这个程序为什么错误?

ChaChing 发表于 2009-3-16 09:33

建议给出出错提示

qianen 发表于 2009-3-16 12:07

H=T(:,:,n)*H;
出错就在这个语句

F_Inzaghi 发表于 2009-3-19 11:50

H=T(:,:,n).*H;
页: [1]
查看完整版本: 程序上的问题(求助)