title: sorting arrays by rows in FORTRAN
body: <p>I need to sort rows of a matrix in ascending/descending order. In matlab I can do quite easily as follows: </p>
  
  <pre><code>A=[3 1 0;2 1 9;0 4 8]
  sortrows(A,1)
  </code></pre>
  
  <p>so it will sort the rows in column "1" and the other columns will follow accordingly. But I need to do this in FORTRAN. And I am not very familiar with FORTRAN. Can anyone advise me how to do this in FORTRAN. Thanks. </p>