Method on @sym: union (A, B)

Return the union of elements of two sets.

Examples:

A = finiteset(sym(1), sym(2));
B = finiteset(sym(pi), 2);
C = union(A, B)
  ⇒ C = (sym) {1, 2, π}

D = interval(sym(3), 4);
union(C, D)
  ⇒ ans = (sym) {1, 2} ∪ [3, 4]

See also: @sym/intersect, @sym/setdiff, @sym/setxor, @sym/unique, @sym/ismember, @sym/finiteset, @sym/interval.

Package: symbolic