Returns the indexes into the input where the input is True.
function ind( larray[*] : logical )
; ; Create sample array ; a = (/1,2,3,4,5,5,4,3,2,1,1,2,3,4,5/) ; ; Assign missing value ; a@_FillValue = 5 ; ; Assigns 0 to locations that are missing values ; a(ind(ismissing(a))) = 0; ; ; Performs an expression on non-zero values ; a(ind(a.ne.0)) = -a(ind(a.ne.0)) * 2 + 1
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?