![]() You may be able to find the missing dependencies using a program like ldd. The libraries that you need to install and how you go about installing them might vary depending on which Linux distribution you are using. To get 32-bit IDL to work, you need install the 32-bit libraries that are missing from the system. Thus, the system will not recognize the 32-bit IDL binary. Most of the new distributions of Linux do not come with many of the 32-bit libraries. usr/local/exelis/idl82/bin/86/idl: not found If you are using a 64-bit Linux system, you might find that -32 argument does not work when you try to start 32-bit IDL. Additional ExamplesĮxample 2 Create an integer array 0,1,2.9 array = INDGEN( 10) Change all elements that are greater than 5 to 5 array = 5 PRINT, array Change all elements that are greater than 10 to 10.NOTE: Starting with IDL 8.3, 32 bit IDL is no longer supported on Linux. In addition, you can use the thread pool keywords TPOOL_MAX_ELTS, TPOOL_MIN_ELTS, and TPOOL_NOTHREAD to override the defaults established by !CPU for a single invocation of this routine. The values stored in the !CPU system variable control whether IDL uses the thread pool for a given computation. This routine is written to make use of IDL’s thread pool, which can increase execution speed on systems with multiple CPUs. Returning !NULL can be helpful if you want to use the result to index another array without having to check the number of matches. Set this keyword to have WHERE return !NULL instead of -1 when no matches are found. This value is the number of subscripts that will be returned via the COMPLEMENT keyword if it is specified. Set this keyword to a named variable that receives the number of zero elements found in Array_Expression. Check the value of !VERSION.MEMORY_BITS to see if your IDL is 64-bit or not. Note: Only 64-bit versions of IDL are capable of creating variables requiring a 64-bit result. Set L64 to force 64-bit integers to be returned in all cases. L64īy default, the result of WHERE is 32-bit integer when possible, and 64-bit integer if the number of elements being processed requires it. If there are no zero elements in Array_Expression, COMPLEMENT returns a scalar integer with the value -1, or the value !NULL if the NULL keyword is set. Together, Result and COMPLEMENT specify every subscript in Array_Expression. These are the subscripts that are not returned in Result. Set this keyword to a named variable that receives the subscripts of the zero elements of Array_Expression. Use the COUNT argument to return this value instead. This effect is for compatibility with previous versions of IDL and should not be used in new code. Note: The system variable !ERR is set to the number of nonzero elements. This value is returned as a longword integer. CountĪ named variable that will receive the number of nonzero elements found in Array_Expression. Both the real and imaginary parts of a complex number must be zero for the number to be considered zero. If /NULL is set, and no matches are found, then WHERE returns the value !NULL. Returns a longword vector containing the subscripts of non-zero array elements matching the specified conditions. Example 1 Create an integer array 0,1,2.9 array = INDGEN( 10) PRINT, 'array = ', array Find the subscripts of all elements that are greater than 5 B = WHERE(array GT 5, count, COMPLEMENT=B_C, NCOMPLEMENT=count_c) Print how many and which elements met the search criteria: PRINT, 'Number of elements > 5: ', count PRINT, 'Subscripts of elements > 5: ', B PRINT, 'Number of elements 5: 4 Subscripts of elements > 5: 6 7 8 9 Number of elements <= 5: 6 Subscripts of elements <= 5: 0 1 2 3 4 5 Syntax See Additional Examples for more information on using WHERE. Or, Use Count to get the number of nonzero elements: index = WHERE(array GT 5, count) Only subscript the array if it is safe: IF count NE 0 THEN array = 5 Examples For example: Use /NULL, if no elements match then array will not be modified: array = 5 To avoid this problem, you should either use /NULL or check the Count argument before indexing. If you use this result as an index into another array without checking for –1 first, then this will return the last element of the array. If the NULL keyword is not set, and all the elements of Array_Expression are zero, then WHERE returns a scalar integer with a value of –1. Frequently the result of WHERE is used as a vector subscript to select elements of an array using given criteria. The length of the resulting vector is equal to the number of nonzero elements in Array_Expression. ![]() ![]() ![]() The WHERE function returns a vector that contains the one-dimensional subscripts of the nonzero elements of Array_Expression. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |