Compute intersections for each segment | MathWorks Interview Question