MATLAB 帮助中心
将 polyshape 孔边界转换为 polyshape 对象数组
polyshape
polyout = holes(polyin)
polyout = holes(polyin) 以 polyshape 对象数组的形式返回 polyshape 对象的孔边界。polyout 中的元素数等于 polyin 中的孔边界数。
polyout
polyin
示例
全部折叠
创建包含两个实心区域和两个孔的多边形。将孔边界转换为 polyshape 对象数组。
P = [0 0; 0 2; 2 2; 2 0; NaN NaN; 0.5 0.5; 0.5 1.5; 1.5 1.5; 1.5 0.5; ... NaN NaN; 3 0.5; 3.5 1.5; 4 0.5; NaN NaN; 3.25 0.6; 3.75 0.6; 3.5 1]; polyin = polyshape(P); plot(polyin) xlim([-0.5 4.5]) ylim([-0.5 2.5])
polyout = 2×1 polyshape array with properties: Vertices NumRegions NumHoles
plot(polyout) xlim([-0.5 4.5]) ylim([-0.5 2.5])
输入 polyshape,指定为标量。
数据类型: polyshape
在 R2017b 中推出
polyshape | boundary | rmholes | ishole
boundary
rmholes
ishole
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处