Method on @sym: interval (A, B)
Method on @sym: interval (A, B, lopen)
Method on @sym: interval (A, B, lopen, ropen)

Return an interval.

Examples:

interval(sym(0), sym(1))
  ⇒ (sym) [0, 1]
interval(sym(0), 1, true, true)
  ⇒ (sym) (0, 1)
interval(sym(0), 1, false, true)
  ⇒ (sym) [0, 1)

Intervals can be degenerate:

interval(sym(1), 1)
  ⇒ (sym) {1}
interval(sym(2), 1)
  ⇒ (sym) ∅

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

Package: symbolic