Borrar filtros
Borrar filtros

How to find intersection between two line

1 visualización (últimos 30 días)
Nhut Ngo
Nhut Ngo el 21 de Abr. de 2020
Editada: Rik el 21 de Abr. de 2020
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.

Respuestas (2)

KALYAN ACHARJYA
KALYAN ACHARJYA el 21 de Abr. de 2020
Editada: KALYAN ACHARJYA el 21 de Abr. de 2020
idx=find(x==y)
And from the index, you get the value.
  1 comentario
Rik
Rik el 21 de Abr. de 2020
This will only turn up values that are exactly equal. Considering that float rounding errors are likely, this could miss several intersections.

Iniciar sesión para comentar.


Rik
Rik el 21 de Abr. de 2020
Editada: Rik el 21 de Abr. de 2020
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

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by