Find intersection point given a line segment

조회 수: 4 (최근 30일)
Giorgis
Giorgis 2017년 11월 18일
댓글: Star Strider 2020년 9월 21일
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

채택된 답변

Star Strider
Star Strider 2017년 11월 18일
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
bram Vermeulen
bram Vermeulen 2020년 9월 21일
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 2020년 9월 21일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Giorgis
Giorgis 2017년 11월 19일
Thanks (once more!)

카테고리

Help CenterFile Exchange에서 Fit Postprocessing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by