Personal IDL library for M. Galloy

single page | use frames     summary     class     fields     routine details     file attributes



top mg_complement

result = mg_complement(indices, n [, count=long])

Returns the complement of an index array.

Return value

lonarr or -1L if complement is empty


indices in required type=lonarr

indices to complement

n in required type=integer type

number of elements in full array


count out optional type=long

set to a named variable to return the number of elements in the complement


For example, try:

IDL> print, mg_complement([0, 9, 3, 6, 7], 10) 1 2 4 5 8

File attributes

Modification date: Wed May 14 15:07:14 2014
Lines: 6
Docformat: rst rst
Personal library of Michael Galloy
Contact me if you have enhancement requests or bug fixes.