Find intersection point given a line segment

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

 Réponse acceptée

Star Strider
Star Strider le 18 Nov 2017
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;

2 commentaires

I don't understand this. I have a similar problem as OP but you will still need the y_intercept value to calculate x_intercept. How do you get this when you don't know y_intercept either.
Star Strider
Star Strider le 21 Sep 2020
Both the slope and y-intercept are required. If you have the data, or at least two (x,y) points defining the line, you can calculate both the slope and y-intercept easily. The rest is straightforward.

Connectez-vous pour commenter.

Plus de réponses (1)

Giorgis
Giorgis le 19 Nov 2017

0 votes

Thanks (once more!)

Catégories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by