inpolygon
- :
in =inpolygon(xq, yq, xv, yv)¶ - :
[in, on] =inpolygon(xq, yq, xv, yv)¶ Test which query points lie inside a polygonal region.
The polygon vertices are (xv, yv). Distinct edge loops may be separated by
NaN; each loop is closed if needed. Multiply connected regions (holes) use the even-odd rule, matching MATLAB when outer and inner loops have opposite orientations.in is true for points inside the polygon or on its boundary and on is true for points exactly on the boundary. Both results have the size of xq. Large query batches are processed in blocks.