www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/SpecifyStemLocationswithMatrixInputsExample.m

    %% Specify Stem Locations with Matrix Inputs  
% Create a 3-D stem plot with matrix data and specify the stem locations
% in the _xy_-plane.    

% Copyright 2015 The MathWorks, Inc.


%%  
figure
[X,Y] = meshgrid(0:.1:1);
Z = exp(X+Y);
stem3(X,Y,Z)    

%%
% |X| and |Y| determine the stem locations. |Z| determines the marker heights.