fixed.Interval
Determine if two fixed.Interval objects overlap
bool = overlaps(A, B)
example
bool = overlaps(A, B) returns a boolean indicating whether two fixed.Interval objects overlap.
bool
A, B
collapse all
Create two fixed.Interval objects and determine if their ranges overlap.
interval1 = fixed.Interval(-1, 1); interval2 = fixed.Interval(0, 1); overlaps(interval1, interval2)
ans = logical 1
When the ranges of the Interval objects overlap, the overlaps function returns a value of 1, or true.
Interval
overlaps
true
Input fixed.Interval objects, specified as fixed.Interval objects, or arrays of fixed.Interval objects.
Whether the input fixed.Interval objects overlap, returned as a logical value or a vector of logical values.
contains | fixed.Interval | intersect | setdiff | union | unique
contains
intersect
setdiff
union
unique