%% Create Surface Plot
% Create three matrices of the same size. Then plot them as a surface. The surface uses Z for both height and color.

[X,Y] = meshgrid(1:0.5:10,1:20);
Z = sin(X) + cos(Y);
surface(X,Y,Z)

%
% By default, surface displays in the axes using a two-dimensional view. Change the axes to a three-dimensional view.

view(3)

% Copyright 2015 The MathWorks, Inc.