From 7:00 PM CST Friday, January 24th - 7:00 PM CST Sunday, January 26th, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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

Syntax

c = sortrows(a)

c = sortrows(a, b)

[c, d] = sortrows(a)

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

Description

Sorts the rows of a matrix in ascending order.

Examples

Inputs

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

Outputs

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.

Details

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

Examples

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

Related Topics

sort

WAS THIS ARTICLE HELPFUL?

Not Helpful