Sorts the rows of a matrix.
c = sortrows(a)
c = sortrows(a, b)
[c, d] = sortrows(a)
[c, d] = sortrows(a, b)
Matrix with the rows to be sorted.
Columns of a for sorting the rows. b is a vector of integral numbers.
Sorted rows of a. Sorts the rows of a in ascending order if elements of b are positive. Sorts the rows of a in descending order if elements of b are negative. MathScript sorts complex vectors by magnitude and angle, in that order. c is a matrix of the same size as a.
Row indexes in a of the rows in c. d is a vector of integral numbers. The output data type is double precision floating-point number.
A = [6, 2, 3, 4; 4, 3, 2, 1]; [C, D] = sortrows(A, [1, 2])
Where This Node Can Run:
Desktop OS: Windows
FPGA: DAQExpress does not support FPGA devices