esort (Control Design and Simulation Module, MathScript Function)

LabView Control Design MathScript Functions

esort (Control Design and Simulation Module, MathScript Function)

Member of the cdutil class.

Syntax

[q, i] = esort(l)

Description

Sorts a list of elements in a vector in descending order based on the real parts of each element. If two or more elements have identical real parts, this function sorts those elements in descending order based on the imaginary parts of each element.

Examples

Inputs

Name Description
l Specifies a vector of elements you want to sort. l is a real or complex vector.

Outputs

Name Description
q Returns the list of elements in l sorted in descending order. q is a real or complex vector.
i Returns the list of indexes this function used to sort l. i is an integer vector.

Examples

l = [-1, -2, 1, 0, 2][q, i] = esort(l)

Related Topics

dsort