我是这样写的;我收到一条错误消息,“未定义的函数或变量 'MATM'”
'MATM' 是函数,其他函数中没有问题。我怎样才能做到这一点?
function FUNC
global LNODS COORDI SHAPE NELEM DZETTA
for I=1:3
for J=1:4
WORMX=zeros(I,J);
end
end
SHAPE=zeros(3,9);
for INODE=1:8
for IELEM=1:NELEM
IPOIN=abs(LNODS(IELEM,INODE));
for K=1:3
GTOP=COORDI(IPOIN,K);
GBOT=COORDI(IPOIN,K+4);
GOSH=((1.0+0.91)*GTOP+(1.0-0.91)*GBOT)/2.0;
for J=1:3
WORMX(K,J)=WORMX(K,J)+GOSH*SHAPE(J,INODE);
end
WORMX(K,4)=WORMX(K,4)+SHAPE(1,INODE)*(GTOP-GBOT)/2.0;
end
end
end
MATM !---error message
end