Sorts matrices and tables according to a key.
inputX: A matrix or table to be sorted. X ranges from 0 to dynamicInputCount - 1. The number of rows in each input matrix must be divisible by the number of rows in the key column. If N is the number of rows in an input matrix and M is the number of rows in the key column with N = k * M, then the sorting is applied to blocks of k rows.
keyColumn: The (zero-based) index of a sort key in input0. All output matrices, including input0, will be sorted based on values on this column.
order: Sorting order.
algorithm: Sorting algorithm.
locale: The locale used for string sorting. The “C” locale commonly used in programming is identical to “en_US”. An empty value means the locale will be automatically chosen based on the settings of the user’s operating system.
true, punctuation characters and symbols are ignored when determining sort order. Otherwise, they are treated as sortable characters. If
false, the behavior depends on locale.
true, the string sorting algorithm is case sensitive. Otherwise, the case is ignored. Notice that case is used only for breaking the tie between otherwise identical strings. For example, “abc” < “ABC” but “ABC0” < “abc1”.
permutation: A matrix that stores the original index of each row in the input matrix.
outputX: A matrix or table that contains the rows received in inputX, sorted according to values of the key column.
If you need to manually craft a locale code, the format is “language[_script][_country]”, where:
language is a lowercase, two-letter, ISO 639 language code (also some three-letter codes),
script is a titlecase, four-letter, ISO 15924 script code,
country is an uppercase, two-letter, ISO 3166 country code (also “419” as defined by United Nations), and codeset and modifier are ignored.
Sort in ascending order.
Sort in descending order.
Input values are converted to numbers before sorting.
If an input value is a string which can not be converted to a number, the value is treated as if it was zero.
Input values are converted to strings before sorting and string ordering rules are applied.
For example, “100” is less than “99”.