%% Represent Vertices in a Matrix
% Create a 3-D Delaunay triangulation.

rng default;
X = rand([10,3]);
DT = delaunayTriangulation(X);

%
% Determine whether vertices 2 and 7 are connected by an edge, and whether vertices 4 and 9 are connected.

E = [2 7; 4 9];
TF = isConnected(DT,E)

% Copyright 2012 The MathWorks, Inc.