Abstract

This chapter covers how to search for specific values within Interactive Data Language (IDL) arrays and sort the values of IDL arrays into increasing or decreasing order. The following IDL procedures are discussed: (1) WHERE function: COUNT, COMPLEMENT, and NCOMPLEMENT keywords, (2) SORT function, and (3) VALUE_LOCATE function. A common programming task is to find the elements of an array that satisfy a particular condition. The WHERE function is an essential tool for doing fast conditional array operations in IDL. Most operations that could be done in a Fortran-like style using FOR loops and IF statements can be done faster and more elegantly in IDL using WHERE. WHERE applies the logical test to every element of the array. The built-in IDL function to sort the elements of an array is SORT. In a manner similar to WHERE, SORT returns a list of the indices of the array sorted in the proper order, not the elements themselves.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.