returns the subscripts of the 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 examples below. This function was inspired by the Unix
UNIQ returns an array of indices into the original array. Note that the index of the last element in each set of non-unique elements is returned. The following expression is a copy of the sorted array with duplicate adjacent elements removed:
Array (UNIQ( Array ))
UNIQ returns 0 (zero) if the argument supplied is a scalar rather than an array.
This routine is written in the IDL language. Its source code can be found in the file
subdirectory of the IDL distribution.