15.11.2014 Views

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

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.

2 Polynomials and Interpolation<br />

−47.95<br />

−48<br />

−4000<br />

−48.05<br />

−48.1<br />

−48.15<br />

−4000<br />

−3500<br />

−3000<br />

−2500<br />

−3500<br />

−4000<br />

Latitude<br />

−48.2<br />

−48.25<br />

−48.3<br />

−4000<br />

−2000<br />

−3000<br />

−3500<br />

−1000<br />

−2500<br />

−2000<br />

−1500<br />

−3000<br />

−3500<br />

−48.35<br />

−4000<br />

−4000<br />

−48.4<br />

−48.45<br />

210.8 211 211.2 211.4 211.6 211.8<br />

Longitude<br />

The arguments for meshgrid encompass the largest and smallest x and y<br />

values in the original seamount data. To obtain these values, use min(x),<br />

max(x), min(y), and max(y).<br />

Closest-Point Searches. You can search through the Delaunay triangulation data<br />

with two functions:<br />

• dsearch finds the indices <strong>of</strong> the (x,y) points in a Delaunay triangulation<br />

closest to the points you specify. This code searches for the point closest to<br />

(211.32, -48.35) in the triangulation <strong>of</strong> the seamount data.<br />

xi = 211.32; yi = -48.35;<br />

p = dsearch(x,y,tri,xi,yi);<br />

[x(p), y(p)]<br />

ans =<br />

211.3400 -48.3700<br />

• tsearch finds the indices into the delaunay output that specify the enclosing<br />

triangles <strong>of</strong> the points you specify. This example uses the index <strong>of</strong> the<br />

2-24

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

Saved successfully!

Ooh no, something went wrong!