MATLAB: Find intersection point given a line segment

line fitting

Hi I have the given image of a curve where the two points (blue crosses) are joint with a line and would like to know where this line would cross the x axis (see green line and point in blue circle).
Thanks in advance

Best Answer

Since it appears to be a linear regression, defined as:
y = slope * x + y_intercept;
the x-axis intercept (where y=0) would be:
x_intercept = -y_intercept / slope;
If you want to know where it intersects y=0.2,
x_intercept = (0.2 - y_intercept) / slope;
Related Question