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

2 ビュー (過去 30 日間)
Gautam Kumar
Gautam Kumar 2016 年 8 月 3 日
編集済み: Abhijeet 2022 年 6 月 8 日
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 件のコメント
KSSV
KSSV 2016 年 8 月 3 日
Post your code..we will find out why it is NaN..
José-Luis
José-Luis 2016 年 8 月 3 日
Google is your friend. I also fail to see a specific Matlab question.

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

回答 (1 件)

Abhijeet
Abhijeet 2022 年 6 月 6 日
編集済み: Abhijeet 2022 年 6 月 8 日
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 .

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by