필터 지우기
필터 지우기

How to find intersection between two line

조회 수: 1 (최근 30일)
Nhut Ngo
Nhut Ngo 2020년 4월 21일
편집: Rik 2020년 4월 21일
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일
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일
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

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by