Create two fixed.Interval objects. Use the setdiff function to find the values that are in Interval object interval1 but not in interval2. In this example, interval1 contains all values between 0 and 1, but interval2 only contains values from 0 to 0.5, so the output Interval object has an interval from 0.5 to 1.
You can use the setdiff function to create an
interval object based on another interval, while excluding zero.
Create an Interval object that contains zero.
myInterval = fixed.Interval(-1,1);
To create an interval based on the Interval object,
myInterval, use the setdiff function. Include
the constructor for a degenerate Interval object containing only zero
as the second argument.
The output Interval object, myInterval_nozero,
contains two intervals, each with an open end point at zero. Therefore, the interval
contains all values between -1 and 1, except 0.