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?
0 个评论
回答(1 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!