23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

dsearch<br />

2dsearch<br />

Purpose Search for nearest point<br />

Syntax K = dsearch(x,y,TRI,xi,yi)<br />

K = dsearch(x,y,TRI,xi,yi,S)<br />

Description K = dsearch(x,y,TRI,xi,yi) returns the index into x and y of the nearest<br />

point to the point (xi,yi). dsearch requires a triangulation TRI of the points x,y<br />

obtained using delaunay.Ifxi and yi are vectors, K is a vector of the same size.<br />

2-464<br />

K = dsearch(x,y,TRI,xi,yi,S) uses the sparse matrix S instead of<br />

computing it each time:<br />

S = sparse(TRI(:,[1 1 2 2 3 3]),TRI(:,[2 3 1 3 1 2]),1,nxy,nxy)<br />

where nxy = prod(size(x)).<br />

See Also delaunay, tsearch, voronoi

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!