Note:

SI = vertexAttachments(TR, VI)
SI = vertexAttachments(TR, VI)
returns
the vertextosimplex information for the specified vertices VI
.
For 2D triangulations in MATLAB^{®}, the triangles SI
are
arranged in counterclockwise order around the attached vertex VI
.
TR  Triangulation representation 
VI  VI is a column vector of indices into the
array of points representing the vertex coordinates, TR.X .
The simplices associated with vertex i are the i 'th
entry in the cell array. If VI is not specified
the vertexsimplex information for the entire triangulation is returned. 
SI  Cell array of indices of the simplices attached to a vertex.
A cell array is used to store the information because the number of
simplices associated with each vertex can vary. The simplices associated
with vertex i are in the i 'th
entry in the cell array SI . 
A simplex is a triangle/tetrahedron or higher dimensional equivalent.
Load a 2D triangulation and use TriRep
to
compute the vertextotriangle relations.
load trimesh2d trep = TriRep(tri, x, y);
Tv = vertexAttachments(trep, 1) Tv{:}
Perform a direct query of a 2D triangulation created using DelaunayTri
.
x = rand(20,1); y = rand(20,1); dt = DelaunayTri(x,y);
t = vertexAttachments(dt,5);
triplot(dt); hold on;
triplot(dt(t{:},:),x,y,'Color','r'); hold off;