https://www.mathworks.com/help/matlab/ref/tsearchn.html
tsearchn - N-D closest simplex search - MATLAB
This MATLAB function returns the indices t of the enclosing simplex of the Delaunay triangulation TRI for each point in XI.
n dclosestsimplexsearchmatlab