>  Docs Center  >  Libraries  >  Daithi  >  NONUNIQ
Libraries

NONUNIQ

NONUNIQ

Name


NONUNIQ

Purpose


Return the subscripts of the non-unique elements in an array.
Note that repeated elements must be adjacent in order to be
found. This routine is intended to be used with the SORT
function. See the discussion of the IDX argument below.
This function is a simple modification of IDL's uniq function.

Category


Array

Calling Sequence


UNIQ(Array [, Idx])

Inputs


Array: The array to be scanned. The type and number of dimensions
of the array are not important. The array must be sorted
into monotonic order unless the optional parameter Idx is
supplied.

Optional Input Parameters


IDX: This optional parameter is an array of indices into Array
that order the elements into monotonic order.
That is, the expression:
Array(Idx)
yields an array in which the elements of Array are
rearranged into monotonic order. If the array is not
already in monotonic order, use the command:
UNIQ(Array, SORT(Array))
The expression below finds the non-unique elements of an unsorted
array:
Array(UNIQ(Array, SORT(Array)))

Outputs


An array of indicies into ARRAY is returned. The expression:
ARRAY(UNIQ(ARRAY))
will be a copy of the sorted Array with non-duplicate adjacent
elements removed.

Common Blocks


None.

Modification History


      Written by Edward C. Wiebe, 2002-07-23 (Modified IDL's
      uniq.pro into nonuniq.pro - so this was really written by RSI)



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us