Home > other >  Help me to look at why get into dead circulation, save the children's class ~
Help me to look at why get into dead circulation, save the children's class ~

Time:10-10

Procedure is as follows, calls the function, after the input parameters, has been dead circulation,

The function way=find_way (X, I, w) % X=[0, 1, 1; 1 0 1; 1 1 0], I=1, w=[1 0 0, 1]
, ~ [m]=size (X);
Persistent k
If isempty (k)
K=1;
End
Persistent flag
If isempty (flag)
flag=1;
End
Persistent t
If isempty (t)
t=1;
End
While the sum (X (:)) ~=0
For j=1: m
If X (I, j)==1
X (I, j)=0;
X (j, I)=0;
K=k + 1;
W (k)=j;
If w (k)==flag& & (sum (X (:)) ~=0)
Flag=I;
K=k - 1;
W (end - t)=flag;
T=t + 1;
Find_way (X, I, w);
End
Find_way (X, j, w);
End
End
End
Way=w;
end
  • Related