How to determine if a segment lies on a polygon?

I mean, i have to check if a segment (who changes in time) is entirely inside a polygon or not. Is there any function in Matlab who does that?

Answers (1)

you can use inpolygon function to check if a point in a polygon.

3 Comments

i know, but a segment is formed by a "lot" of points. Should i make a for cycle using inpolygon function?
you can try, the time is import or not?
Use a for loop. I doubt you have "a lot" of points. How many? Hundreds of millions? If you have just a few tens of thousands, it will be very fast. If you have millions of points, then you might consider image processing techniques instead.

Sign in to comment.

Categories

Asked:

on 7 Oct 2016

Commented:

on 7 Oct 2016

Community Treasure Hunt

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

Start Hunting!