MATLAB: How to create one errorbar for multiple data points

errorbarplot

Hello,
i want to plot a x-vector (1,100) and a y-vector (1,100) with an errorbar. I have already calculated the single value for the standard deviation of the y-vector. This y-vector has been measured 100 times, so i just need one standard deviation for the 100 values of y.
I tried to do this with:
x = ones(1,100);
y = ...;
error = 4.17e-04;
errorbar(x,y,error,'.');

Best Answer

If I understand you right, could you do something like
figure; hold on
plot(x, y, 'bx')
errorbar(mean(x), mean(y), std(y), 'k+')
hold off
which I believe should plot all of your y values at x=1, and then overlay an errorbar centred at the mean point with a size equal to the standard deviation of y.