<< NL_F_SortColumns NL_F: Function NL_F_Summary >>

NARVAL >> NL_F: Function > NL_F_SortRows

NL_F_SortRows

Sort a matrix in respect with a column.

Calling Sequence

[M] = NL_F_SortRows(M,C,D)

Arguments

M :

Matrix.

C :

Column index.

D :

Direction.

Description

NL_F_SortRows sorts the matrix M in respect with the column C. If D='i', increasing order is used. If D='d', decreasing order is used.

Examples

A=[95 45 92 41 13 1 84;
95 7 73 89 20 74 52;
95 7 73 5 19 44 20;
95 7 40 35 60 93 67;
76 61 93 81 27 46 83;
76 79 91 0 19 41 1];
B=NL_F_SortRows(A,2,'i');//application of NL_F_SortRows

Report an issue
<< NL_F_SortColumns NL_F: Function NL_F_Summary >>