LabVIEW Control Design and Simulation Module

sortdown (MathScript RT Module Function)

  • Updated2023-03-14
  • 1 minute(s) read

sortdown (MathScript RT Module Function)

Owning Class: dynchar

Requires: Control Design and Simulation Module and MathScript RT Module

Syntax

[q, i] = sortdown(l)

q = sortdown(l)

Legacy Name: dsort

Description

Sorts a list of elements in a vector in descending order based on the magnitude 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.

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

l = [0.1, 0.2, 0.15, 0.3, 0.25]
[q, i] = sortdown(l)

Related Topics

sortdownreal