inpolygon

inpolygon是MATLAB中用于检测点是否位于多边形内部或边界上的函数。它支持非凸、自相交多边形,以及多重连接的多边形。函数返回一个指示点位置的矩阵,并能区分点在边界上还是完全在内部。提供的两个示例分别展示了自相交和多重连接的多边形应用。
摘要由CSDN通过智能技术生成

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值