MATLAB 帮助中心
删除 polyshape 中的孔
polyshape
polyout = rmholes(polyin)
polyout = rmholes(polyin) 返回一个 polyshape 对象,此对象由删除所有孔边界之后的多边形 polyin 的实心边界组成。
polyin
示例
全部折叠
创建具有一个孔的多边形。
t = 0.05:0.5:2*pi; x1 = cos(t); y1 = sin(t); x2 = 0.5*cos(t); y2 = 0.5*sin(t); polyin = polyshape({x1,x2},{y1,y2})
polyin = polyshape with properties: Vertices: [27×2 double] NumRegions: 1 NumHoles: 1
plot(polyin)
创建一个删除孔之后的新多边形。
polyout = polyshape with properties: Vertices: [13×2 double] NumRegions: 1 NumHoles: 0
plot(polyout)
输入 polyshape,指定为标量、向量、矩阵或多维数组。
数据类型: polyshape
全部展开
用法说明和限制:
必须启用动态内存分配才能进行代码生成。
在 R2017b 中推出
rmboundary | ishole | holes | polyshape
rmboundary
ishole
holes
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处