Line Intersect

Finds the points of intersection for linear time series data, very efficiently

You are now following this Submission

Finds the intersection point for a set of time series data, without any loops.

Elapsed time is 0.000212 seconds, searching 1800 points, and finding 90 intersections, on a Core 2 Duo E6600 :)

Example Code::
~~~~~~~~~~~~~~

numElem= 50;
a=rand(numElem,1);
b=rand(numElem,1);
xs=1:numElem;

[x,y, signs]=lineIntersect(a,b);
plot(xs,a,'k',xs,b,'b',x,y,'ro')

Cite As

Jonathan Millin (2026). Line Intersect (https://www.mathworks.com/matlabcentral/fileexchange/19642-line-intersect), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0