Method on @infsup: union (A)
Method on @infsup: union (A, B)
Method on @infsup: union (A, [], DIM)

Build the interval hull of the union of intervals.

With two arguments the union is built pair-wise. Otherwise the union is computed for all interval members along dimension DIM, which defaults to the first non-singleton dimension.

Accuracy: The result is exact.

x = infsup (1, 3);
y = infsup (2, 4);
union (x, y)
  ⇒ ans = [1, 4]

See also: @infsup/intersect, @infsup/setdiff, @infsup/setxor.

Package: interval