Matrix/
union.pro
find the union between 2 matrices of whole numbers
see also different and inter.
union
Calculation
result = union(a, b)
Return value
an array containing the set of values in a and b.
Parameters
a
in
required
arrays of positive integers, which need
not be sorted. Duplicate elements are ignored, as they have no
effect on the result
b
in
required
see a
Examples
IDL> a = [2,4,6,8]
IDL> b = [6,1,3,2]
IDL> res=union(a,b)
IDL> print, res
1 2 3 4 5 6
8
this is the list ao all elements in either sets.
Version history
Version
$Id: union.pro 378 2008-08-12 12:35:46Z pinsard $
History
Known issues
Restrictions
These functions will not be efficient on sparse sets with wide
ranges, as they trade memory for efficiency.
The HISTOGRAM function
is used, which creates arrays of size equal to the range of the
resulting set.
Produced by IDLdoc 2.0.