MATLAB: Plotting data with and without errorbars

errorbarplot

Hi!
I'm trying to plot my data with matlab. The problem is that I'd like to plot, on the same graph, my data with errorbars, and a curve without it. Could anyone help me with this?
It's probably very simple but I couldn't find a solution in the matab help nor on google.
Thanks in advance!
Aurélie

Best Answer

X = 0:pi/10:pi;
Y = sin(X);
E = std(Y)*ones(size(X));
errorbar(X,Y,E)
HTH,
Arnaud