2

I'm writing a Matlab program that has to do the following thing I'm stuck with.

I have a file containing the names of two points on every line (the points have its respective coordinates in the space). Let's say the segments are airways and the points are airports.

I have plotted all the airways, and obviously some of them intersect at some point. I would like to draw a cross 'X' at those points of intersection. How can I do this? Is there any already-implemented Matlab function that allows me to find the intersection points of segments?

And another question related to this, provided the file (with about 100 lines, where in every line a segment is defined by two points) should I do a loop that checks all the intersecting points of the first segment with the other 99 segments, and then the second segment with the other 98 segments? Or there is a more efficient way in order to do that? Thank you!!!

Heisenberg
  • 147
  • 1
  • 7

0 Answers0