rmboundary
删除 polyshape
边界
说明
示例
删除多边形边界
创建由两个三角形组成的多边形,然后删除矩心更靠近点 (4,2) 的三角形。您可以使用 sortboundaries
函数访问更靠近参考点的三角形所对应的边界索引(排序后为 1)。
x1 = [0 1 2]; y1 = [0 1 0]; x2 = [2 3 4]; y2 = [1 2 1]; polyin = polyshape({x1,x2},{y1,y2}); plot(polyin)
polysort = sortboundaries(polyin,'centroid','ascend','ReferencePoint',[4 2]); polyout = rmboundary(polysort,1); plot(polyout)
输入参数
polyin
— 输入 polyshape
标量
输入 polyshape
,指定为标量。
数据类型: polyshape
I
— 边界索引
整数标量 | 整数向量
边界索引,指定为整数标量或由整数组成的向量。I
的每个元素对应于输入 polyshape
的一个边界。
数据类型: double
| single
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
TF
— 简化指示符
true
| false
简化指示符,指定为下列值之一:
true
- 当输入顶点产生交集或不正确嵌套时,更改多边形顶点以生成明确定义的多边形。false
- 即使有交集或不正确嵌套,也不更改输入顶点。使用未明确定义的多边形进行计算可能会产生不准确或意想不到的结果。
数据类型: logical
扩展功能
C/C++ 代码生成
使用 MATLAB® Coder™ 生成 C 代码和 C++ 代码。
用法说明和限制:
必须启用动态内存分配才能进行代码生成。
名称-值对组必须为编译时常量。
版本历史记录
在 R2017b 中推出
另请参阅
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)