%% Point Location of 2-D Query Points
% Create a 2-D Delaunay triangulation for a set of random points.

rng default
X = rand(10,2);
dt = DelaunayTri(X);

% Find the triangles that contain specified query points.

Q = [0.25 0.25; 0.5 0.5];
triids = pointLocation(dt,Q)

% Copyright 2020 The MathWorks, Inc.