How do you find the coordinates of intersections of two lines?

1 visualización (últimos 30 días)
Gautam Kumar
Gautam Kumar el 3 de Ag. de 2016
Editada: Abhijeet el 8 de Jun. de 2022
So this is a question I got in class and I tried using different methods to find the coordinates of two numbers and it gives me a NaN error.
  2 comentarios
KSSV
KSSV el 3 de Ag. de 2016
Post your code..we will find out why it is NaN..
José-Luis
José-Luis el 3 de Ag. de 2016
Google is your friend. I also fail to see a specific Matlab question.

Iniciar sesión para comentar.

Respuestas (1)

Abhijeet
Abhijeet el 6 de Jun. de 2022
Editada: Abhijeet el 8 de Jun. de 2022
Hi Gautam Kumar
I am assuming that the NaN error in your code is probably due to division by 0.This can happen if given two lines as input are collinear.
For finding coordinates of intersection of two points you can download and use the function line_intersection from MathWorks FIle Exchange .

Categorías

Más información sobre Data Distribution Plots 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