plotting data with and without errorbars

11 次查看(过去 30 天)
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

采纳的回答

Arnaud Miege
Arnaud Miege 2011-5-20
X = 0:pi/10:pi;
Y = sin(X);
E = std(Y)*ones(size(X));
errorbar(X,Y,E)
HTH,
Arnaud
  3 个评论
Arnaud Miege
Arnaud Miege 2011-5-20
Use hold on:
X = 0:pi/10:pi;
Y = sin(X);
E = std(Y)*ones(size(X));
errorbar(X,Y,E)
hold on
Z = cos(X);
plot(X,Z)
Aurélie Merckx
Aurélie Merckx 2011-5-20
That did the trick.
Thank you very much!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Errorbars 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by