inpolygon True for points inside or on a polygonal region.
IN = inpolygon(X,Y,XV,YV) returns a matrix IN the size of X and Y.
IN(p,q) = 1 if the point (X(p,q), Y(p,q)) is either strictly inside or
on the edge of the polygonal region whose vertices are specified by the
vectors XV and YV; otherwise IN(p,q) = 0.
[IN ON] = inpolygon(X,Y,XV,YV) returns a second matrix, ON, which is
the size of X and Y. ON(p,q) = 1 if the point (X(p,q), Y(p,q)) is on
the edge of the polygonal region; otherwise ON(p,q) = 0.
inpolygon supports non-convex and self-intersecting polygons.
The function also supports multiply-connected or disjoint polygons;
however, the distinct edge loops should be separated by NaNs. In the
case of multiply-connected polygons, the external and internal loops
should have opposite orientations; for example, a countercl
inpolygon
最新推荐文章于 2022-07-06 18:35:43 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)