d = b*[1;i]
p = ~~b(:,1);
e = p*d'
f = abs(e-e.')
r = d
f(~f) = 1
f(~a) = Inf
h = p'*Inf;
h(1) = 0
for j=2:length(d)
q=(p*h+f)
[h, r] = min(q')
end
[x,c]=max(h);
x=h
while(c(1)>1)
c=[r(c(1)) c]
end
%%%%%%%%%%%
%%%%%%%%%%%
%%%%%%%%%%%
%%% %%%
%%% :-) %%%
%%% %%%
%%%%%%%%%%%
%%%%%%%%%%%
%%%%%%%%%%%
|