Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


mg_any

mg_any.pro (mglib)

Determine whether any elements of an array of logical values is true.

Syntax


result = mg_any(condition [, indices=lonarr])

Return value


0B or 1L

Parameters


condition in required type=numeric array

array of conditions to check

Keywords


indices out optional type=lonarr

array of indices of true values in condition

Examples


For example, determine if there are any elements between 0.1 and 0.2 (or between 0.6 and 0.7):

IDL> x = randomu(seed, 10) IDL> print, x 0.882556 0.573106 0.778631 0.663021 0.869744 0.026374 0.750390 0.655109 0.979332 0.512633 IDL> print, mg_any(x gt 0.1 and x lt 0.2) 0 IDL> print, mg_any(x gt 0.6 and x lt 0.7) 1



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us