![]() |
Exploiting MATLAB's Data Structures |
tri
= delaunay(x,y) produces the Delaunay triangulation for
the points (x,y), taken element-wise. The matrix tri is M-by-3 and
each row contains the indices of the points that make up a given triangle.
For instance x(tri(2,:)) are the x-coordinates of the points that
make of the second triangle.
trisurf(tri,x,y,z)
produces a triangular surface plot from the Delaunay triangulation, the
data points (x,y) and the height of the surface z.
s
= sparse(I,J,V) produces a sparse matrix that contains
values at the element with indices I(k),J(k). The value at for that element
is set to V(k). If any of the values in I,J overlap they are added together
to produce the final result. This "summing" property of sparse
can be quite handy at times (make a mental note of it).
![]()
Copyright © 1997 The MathWorks,
Inc.
clay@mathworks.com
$Revision$ $Date$