%% 3-D Surface Plot
% Create a set of 3-D points and compute the Delaunay triangulation using the delaunay function. Plot the surface defined by the triangulation.

[x,y] = meshgrid(1:15,1:15);
z = peaks(15);
T = delaunay(x,y);
trisurf(T,x,y,z)

%
% Alternatively, you can create and plot a triangulation object.

TO = triangulation(T,x(:),y(:),z(:));
trisurf(TO)

% Copyright 2015 The MathWorks, Inc.