Somewhat related to Sort matrix by columns and rows without changing them, but more general. I'd like to sort a square matrix (a 3 by 3 in my case, but surely the general solution will treat any), ...
I have matrix in as shown, consisting of real numbers and 0. How can I sort it to become out as shown? ...
Say I have matrix how to sort on row by row basis to get: