%% Find Simplices Attached to Specified Edges
% Load a 3-D triangulation to compute the tetrahedra attached to specified edges.

load tetmesh
trep = TriRep(tet,X);
v1 = [15 21]';
v2 = [936 716]';
t1 = edgeAttachments(trep,v1,v2)

%
% Alternatively, you can specify the inputs with an edges matrix.

e = [v1 v2];
t2 = edgeAttachments(trep,e);
isequal(t1,t2)

% Copyright 2020 The MathWorks, Inc.