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

2 vues (au cours des 30 derniers jours)
Gautam Kumar
Gautam Kumar le 3 Août 2016
Modifié(e) : Abhijeet le 8 Juin 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 commentaires
KSSV
KSSV le 3 Août 2016
Post your code..we will find out why it is NaN..
José-Luis
José-Luis le 3 Août 2016
Google is your friend. I also fail to see a specific Matlab question.

Connectez-vous pour commenter.

Réponses (1)

Abhijeet
Abhijeet le 6 Juin 2022
Modifié(e) : Abhijeet le 8 Juin 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 .

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by