I have coordinates of some points$(x,y)$, that I want to sort them,at the first by $y$ coordinates and second sort $x$ coordinates between those points that have equal $y$ coordinate. Is there anyone know any function in matlab about it? I examined it by $SORT$ function, but this function just sort each column of matrix.
Please help me.
Thanks.
sortrows should be what you are looking for.
Though you may need to swap $x$ and $y$ first, or use the optional argument to tell it which column to base the sort first.
(BTW, the kind of ordering you are looking for is called "lexicographical order"; that may help you do more searches on the internet.)