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

    %% Change Error Bar Marker and Color
% Load the |count| data set to get the three-column matrix |count| that
% contains traffic volume for three street locations over the course of a
% day. Compute the mean of |count| for each row.

% Copyright 2015 The MathWorks, Inc.


load count.dat;
y = mean(count,2);

%%
% Compute the standard deviation of |count| for each row and normalize by
% the number of elements in the sample by setting the second input argument to 1.
e = std(count,1,2);

%% 
% Plot the computed average traffic volume, |y|, and the computed standard
% deviations, |e|, for the three street locations. Set the |LineSpec| to specify
% a red color, cross markers, and no line.
figure
errorbar(y,e,'rx')