%% Plot Single Data Series at Specified x values
% Plot 50 data values of cosine evaluated between 0 and 2\pi and specify the set of x values for the stem plot.

figure
X = linspace(0,2*pi,50)';
Y = cos(X);
stem(X,Y)

% The first vector input determines the position of each stem on the x-axis.
% Copyright 2015 The MathWorks, Inc.