Plot a triangular mesh in 3D. The variable tri is the triangular meshing of the points
(
x,
y)
which is returned fromdelaunay
. The variable z is value at the point(
x,
y)
. The output argument h is the graphic handle to the plot.
The following code
rand ('state', 10) x = 3 - 6 * rand (1, 50); y = 3 - 6 * rand (1, 50); z = peaks (x, y); tri = delaunay (x, y); trimesh (tri, x, y, z);
Produces the following figure
![]() |