Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

sort (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the basic class.

Syntax

c = sort(a)

[c, d] = sort(a)

Description

Sorts the input elements in ascending order.

Examples

Inputs

Name Description
a Specifies a vector or matrix.

Outputs

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

Examples

A = [-1+2i, 3, -1-2i, -4]
[C, D] = sort(A)

Related Topics

sortrows


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit