|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
小弟初学matlab,作业是求static condensation
以下为问题:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [K]=static_condensation(Kx,keepDOF)
n11=max(size(keepDOF)); n22=max(size(Kx))-n11;
nt=max(size(Kx)); static11=keepDOF; k=1; li=1;
for i=1:nt
if(li<=n11)
for l=li:n11
if(i==static11(l)), li=li+1; break;
else static22(k)=i; k=k+1; break; end
end
else
static22(k)=i; k=k+1;
end
end
for i=1:n11
for j=1:n11, K11(i,j)=Kx(static11(i),static11(j)); end
end
for i=1:n22
for j=1:n22, K22(i,j)=Kx(static22(i),static22(j)); end
end
for i=1:n11
for j=1:n22, K12(i,j)=Kx(static11(i),static22(j)); end
end
for i=1:n22
for j=1:n11, K21(i,j)=Kx(static22(i),static11(j)); end
end
K22S=-K12*K22^(-1)*K21; K=K11+K22S;
我运行之后出现以下描述:
??? Input argument "keepDOF" is undefined.
Error in ==> static_condensation at 3
n11=max(size(keepDOF));
不知道是哪里出错了。。。求高手解惑,小弟在这里感激不尽!!
[ 本帖最后由 ChaChing 于 2010-2-25 14:39 编辑 ] |
-
command window中显示错误
|