interval_intersect

interval_intersect(intervals_1, intervals_2)

INTERVAL_INTERSECT Compute an intersection matrix for two lists of intervals

Usage:

intersections = interval_intersect(intervals_1, intervals_2) intersections = interval_intersect() % runs demo

Inputs:

intervals_1 : Nx2 double - [start end] bounds – required intervals_2 : Mx2 double - [start end] bounds – required

Outputs:
intersectionsNxM logical - intersections(i,j) is true when

intervals_1(i,:) overlaps intervals_2(j,:)

See also: pick_from_time_segments

∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿