%% Specify Stem Locations with Vector Inputs
% Create a 3-D stem plot and specify the stem locations along a curve. Use view to adjust the angle of the axes in the figure.

figure
X = linspace(-5,5,60);
Y = cos(X);
Z = X.^2;
stem3(X,Y,Z)
view(-8,30)

% X and Y determine the stem locations. Z determines the marker heights.
% Copyright 2015 The MathWorks, Inc.