plotting data with and without errorbars

조회 수: 11 (최근 30일)
Aurélie Merckx
Aurélie Merckx 2011년 5월 20일
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