rows_sort

Treat the rows of matrix as vectors and sort each row in ascending or descending order

Arguments

  1. Matrix
  2. String 'a' or 'd', 'a' for ascending and 'd' for descending order

Output

Resulting matrix

Examples

rows_sort