MATLAB: How to write a code in matlab for this loop to rank? For all p ∈ D Do For all q ∈ Nk(p) Do R ← Rank p by q End End

MATLAB

Ranking a point

Best Answer

If by "Rank p by q" you mean sort, take a look at the SORT and SORTROWS functions.
Related Question