How to find intersection between two line

Could anyone help me with this? I'm trying to find all of the points where my y and y_line interection. Thank you so much.

回答 (2 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 4 月 21 日
編集済み: KALYAN ACHARJYA 2020 年 4 月 21 日

0 投票

idx=find(x==y)
And from the index, you get the value.

1 件のコメント

Rik
Rik 2020 年 4 月 21 日
This will only turn up values that are exactly equal. Considering that float rounding errors are likely, this could miss several intersections.

サインインしてコメントする。

Rik
Rik 2020 年 4 月 21 日
編集済み: Rik 2020 年 4 月 21 日

0 投票

tol=2*eps;
L_intersect = abs(y-y_line.Value) < tol;
x(L_intersect)
%you could use find(L_intersect), but you don't really need it here

カテゴリ

質問済み:

2020 年 4 月 21 日

編集済み:

Rik
2020 年 4 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by