%% Set Surface Transparency Using z Values
% Create a surface chart. Vary the transparency across the surface based on the z values.

s = surf(peaks);
alpha(s,'z')

% Copyright 2015 The MathWorks, Inc.