Matrix/
different.pro
calculate the different elements of 2 matrix of positive whole numbers.
different
Calculation
result = different(a, b)
Return value
tableau
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> different(a,b) = [ 4, 8] ; Elements in A but not in B
Version history
Version
$Id: different.pro 325 2007-12-06 10:04:53Z pinsard $
History
Known issues
Restrictions
The empty set is denoted by an array with the first element equal to
-1.
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.