rmholes
删除 polyshape
中的孔
说明
示例
填充多边形的孔
创建具有一个孔的多边形。
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: [27x2 double] NumRegions: 1 NumHoles: 1
plot(polyin)
创建一个删除孔之后的新多边形。
polyout = rmholes(polyin)
polyout = polyshape with properties: Vertices: [13x2 double] NumRegions: 1 NumHoles: 0
plot(polyout)
输入参数
polyin
— 输入 polyshape
标量 | 向量 | 矩阵 | 多维数组
输入 polyshape
,指定为标量、向量、矩阵或多维数组。
数据类型: polyshape
扩展功能
C/C++ 代码生成
使用 MATLAB® Coder™ 生成 C 代码和 C++ 代码。
用法说明和限制:
必须启用动态内存分配才能进行代码生成。
版本历史记录
在 R2017b 中推出
另请参阅
rmboundary
| ishole
| holes
| polyshape
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)