Matrix sorting by row or column - DEPRECATED
[B,I] = CL_matSort(A,num [,option,direction]);
Sorts elements of a matrix.
The matrix A can be considered as a set of column vectors or row vectors.
- If option is 'c', A is considered as a set of column vectors. num is then the number of the column to be sorted (by rows!). All the other columns are sorted accordingly.
- If option is 'r', A is considered as a set of row vectors. num is then the number of the row to be sorted (by columns!). All the other rows are sorted accordingly.
The sorting order is determined by direction (increasing by default).
Warning!
The meaning of option may be confusing. The meaning is different from that of the 'option' argument of Scilab's gsort function.
Matrix (PxN)
Row or column number (1x1)
(string, optional) Indicates if num is a column number ('c') or row number ('r'). Default is 'c' (1x1)
(string, optional) Sorting order: 'i' = increasing, 'd' = decreasing (1x1). Default is 'i' (1x1)
Sorted matrix (PxN)
Index such that A(:,I) = B if option='r' or A(I,:) = B if option='c' (1xN or Px1)
CNES - DCT/SB