use errorbar
, for example
errorbar(Vector1,Err)
plots Vector1 and draws an error bar at each element of Vector1. The error bar is a distance of Err(i) above and below the curve so that each bar is symmetric and 2*E(i) long.
Another example:
load count.dat;
y = mean(count,2);
e = std(count,1,2);
errorbar(y,e,'xr')
Note, all this was taken from Matlab’s documentation, so next time try to read the documentation.
solved In Matlab how do I automatically plot a set of vectors with means and error bars?