15.11.2014 Views

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Interpolation<br />

You can use triplot to print the resulting triangles in two-dimensional space.<br />

You can also add data for a third dimension to the output <strong>of</strong> delaunay and plot<br />

the result as a surface with trisurf, or as a mesh with trimesh.<br />

Plotting a Delaunay Triangulation. To try delaunay, load the seamount data set and<br />

view the longitude (x) and latitude (y) data as a scatter plot:<br />

load seamount<br />

plot(x,y,'.','markersize',12)<br />

xlabel('Longitude'), ylabel('Latitude')<br />

grid on<br />

Latitude<br />

−47.95<br />

−48<br />

−48.05<br />

−48.1<br />

−48.15<br />

−48.2<br />

−48.25<br />

−48.3<br />

−48.35<br />

−48.4<br />

−48.45<br />

210.8 211 211.2 211.4 211.6 211.8<br />

Longitude<br />

Apply Delaunay triangulation and use triplot to overplot the resulting<br />

triangles on the scatter plot:<br />

tri = delaunay(x,y);<br />

hold on, triplot(tri,x,y), hold <strong>of</strong>f<br />

2-21

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

Saved successfully!

Ooh no, something went wrong!