Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

sortrows (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: basic

Requires: MathScript RT Module


c = sortrows(a)

c = sortrows(a, b)

[c, d] = sortrows(a)

[c, d] = sortrows(a, b)


Sorts the rows of a matrix in ascending order.



Name Description
a Specifies a matrix.
b Specifies the columns of a to use to sort the rows. b is an integer vector.


Name Description
c Returns the rows of a in ascending order. LabVIEW sorts complex vectors by magnitude and angle, in that order. c is a matrix of the same size as a.
d Returns the row indexes in a of the rows in c. d is an integer vector.


The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized


A = [6, 2, 3, 4; 4, 3, 2, 1]
[C, D] = sortrows(A, [1, 2])

Related Topics



 Was this document helpful?  submit
  Helpful Not Helpful