它循环直到最后一次,然后我收到一个错误“尝试访问 EQ_NUM(8);索引超出范围,因为 numel(EQ_NUM)=7。”
N_NODE=8
N_PRE_DISP=2
DISP_NODE= [2 7]
EQ_NUM = 0;
for i = 1:N_PRE_DISP
NODE=DISP_NODE(i);
EQ_NUM(NODE) = -i;
end
ROW = 0;
for i = 1:N_NODE
if (EQ_NUM(i)==0)
ROW = ROW+1;
EQ_NUM(i)=ROW;
end
end