Untitled

 avatar
unknown
plain_text
2 years ago
422 B
5
Indexable
for progress=2:Np
    dist_min = inf
    for Pe=1:Ne
        for p=1:Np
            if p~ismember(explored)
                if vzdalenost(p,pe)<dist_min
                    dist_min = vzdalenost(p,pe)
                    from = points(explored(Pe),:)
                    to = points(p,:)
                end
            end
        end
    end
    paths(progress-1)=[from,to]
    explored(progress)=to
end
Editor is loading...