I am looking to do a nested sort with a matrix in MATLAB. Say my matrix looks like this:
[b a;
b c;
a c;
a a]
I would like to first sort by the first column and maintain that sort, then sort by the second column. The result would be:
[a a;
a c;
b a;
b c]
How would it be done?