![Sorting a matrix by row or column statistics](https://blogs.sas.com/content/iml/files/2011/08/t_sortcol.png)
In a previous blog post, I showed how to use the SAS/IML SORT and SORTNDX subroutines to sort rows of a matrix according to the values of one or more columns. There is another common situation in which you might need to sort a matrix: you compute a statistic for