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
答案 0 :(得分:0)
嵌套函数(即文件中的辅助函数)仅在文件中可见。您需要将matm函数移动到自己的文件中。