Find the coordinates of intersection of two lines

5 次查看(过去 30 天)
I have two lines in the form y1 = 1 + tand(theta1)*x and y2 = 1 - tand(theta2)*x
How would I be able to determine the point of intersection of these two lines? How would I be able to do the same if I have more than one pair of lines?

回答(1 个)

Image Analyst
Image Analyst 2015-12-27
They intersect when the y values are the same, so y1=y2, or
1 + tand(theta1)*x = 1 - tand(theta2)*x
So obviously the answer is x=0, which makes sense. You have two lines intersecting the y axis at 1 with different slopes: slope1 = tand(theta1) and slope2 = tand(theta2). But if you have two lines both intersecting at the y axis at a height of 1, and the two slopes are different, then they must only cross at the y intercept and nowhere else, unless the slopes are equal in which case they will overlap 100% and intersect/cross everywhere.

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by