%% Plot at Points from 2-D Grid
% Create 2-D grid coordinates with x-coordinates defined by the vector x and y-coordinates defined by the vector y.

x = -2:0.5:2;
y = 1:0.2:2;
[X,Y] = meshgrid(x,y);

% Evaluate the peaks function over the 2-D grid.

Z = peaks(X,Y)

% Use the calculated values to create a three-dimensional surface plot.

surf(Z)

% Copyright 2020 The MathWorks, Inc.