3/31/2024 0 Comments Sort idlNote: Only 64-bit versions of IDL are capable of creating variables requiring a 64-bit sort. Set L64 to force 64-bit integers to be returned in all cases. Keywordsīy default, the result of SORT is 32-bit integer when possible, and 64-bit integer if the number of elements being sorted requires it. Array values which are Not A Number (NaN) are moved to the end of the resulting array. Complex arrays are sorted by their magnitude. String arrays are sorted using the ASCII collating sequence. Array can be any basic type of vector or array. Note: If Array contains any identical elements, the order in which the identical elements are sorted is arbitrary and may vary between operating systems. The result is always a vector of integer type with the same number of elements as Array. When sorting data including Not A Number (NaN) values, the NaN entries are moved to the end of the resulting array. IDL prints: SORT(A) = 3 4 1 0 2 Elements of A in sorted order: 1 2 3 4 7 Elements of A in descending order: 7 4 3 2 1Ī < A < A < A < A Example 2 Sorting NaN Values PRINT, 'Elements of A in descending order: ', A Display the elements of A in descending order: PRINT, 'Elements of A in sorted order: ', A Display the elements of A in sorted order: The SORT function returns a vector of subscripts that allow access to the elements of Array in ascending order.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |