Main Content

isEdge

(不推荐)测试顶点是否通过边相连接

不推荐使用 isEdge(TriRep)。请改用 isConnected(triangulation)

不推荐使用 TriRep。请改用 triangulation

说明

示例

如果 V1(i)V2(i) 是三角剖分中的边,则 TF = isEdge(TR,V1,V2) 返回 1/0 (true/false) 标志的数组,其中每个元 TF(i) 都为 true。

TF = isEdge(TR,EDGE) 指定矩阵格式的边开始和结束索引。

示例

全部折叠

加载二维三角剖分并使用 TriRep 查询各对点之间是否存在边。

load trimesh2d
trep = TriRep(tri,x,y);

测试顶点 3 和 117 是否通过边相连接。

isEdge(trep,3,117)
ans = logical
   1

测试顶点 3 和 164 是否通过边相连接。

isEdge(trep,3,164)
ans = logical
   0

使用 DelaunayTri 创建三维三角剖分。

X = rand(10,3);
dt = DelaunayTri(X);

测试顶点 2 和 7 是否通过边相连接。

isEdge(dt,2,7)
ans = logical
   0

输入参数

全部折叠

三角剖分表示,指定为 TriRepDelaunayTri 对象。

边顶点的索引,指定为列向量。V1V2 表示网格中顶点的索引,即顶点坐标数组中的索引。

边顶点的索引,指定为矩阵。EDGEn×2 矩阵,其中 n 是查询边的数量。

版本历史记录

在 R2009a 中推出