Sort a matrix by more than one column


Is there a way to sort a matrix by more than one column? I have a matrix of panel data and I would like to first sort it by year, then by cross-section. There are columns with unique year and cross section identifiers in the data matrix. Any suggestions?

asked December 12, 2013

1 Answer


It looks like I ran to the forum too quickly. "sortmc" appears to do the trick.