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

조회 수: 1 (최근 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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by