Sorting entire matrix according to one column in matlab

Try this:

sortrows(a,2)

This should sort according to the second column.

Leave a Comment