Matrix.Sort(Array, Array) Method

Top 

Description

Sorts the matrix in the order of the columns specified. Example: matrix.Sort({0, 1, 2}, {1, -1, 1}) sorts by the first column ascending, then the second descending, then the third ascending. When FreeFlyer sorts by the column the rows will remain grouped during the sorting. If there are two numbers in the column with the same value, then FreeFlyer will keep the rows grouped and sort by the value of the next column.

 

Timing Precision Mode

This page describes functionality in millisecond timing precision mode. Millisecond timing precision mode is deprecated and will be removed in a future release. We recommend that you migrate your Mission Plans to nanosecond timing precision mode.

Click here to see the documentation for this object in nanosecond timing precision mode.

 

Method Signature

Matrix.Sort(

Array sortColumn,


Array sortDirection)

 

 

Arguments

sortColumn


Description:

The columns which determine the sort order. Ex: {0, 1, 2} sorts by the first column, then the second, then the third.

Required Size:

At least 1

 

 

sortDirection


Description:

Specifies ascending or descending sort order with 1 or -1.

Required Size:

At least 1

 

 

 

Syntax

myMatrix1.Sort(myArray1, myArray2);

 

 

See also

Matrix Object

Matrix, Array, and Variable Math Guide