Name
CL_matSort — Sorts increasingly or decreasingly a row or a column of a matrix
Calling Sequence
[B] = CL_matSort(A,num,[par1,par2]);
Parameters
- A:
matrix to be sorted (MxN)
- num:
row or column number to be sorted(1 x 1)
- par1:
(optionnel) 'c' = column ; 'r' = row
- par2:
(optionnel) 'i' = increasingly; 'd' = decreasingly
- B:
sorted matrix (m x n)
Examples
A=[1,3,2;1000,1010,1020;10,80,15];
// Sort of 2nd column increasingly, other columns sorted accordingly
[B] = CL_matSort(A,2);
// Sort of 3r row decreasingly, other rows sorted accordingly
[B] = CL_matSort(A,3,'r','d');