How to put errorbars
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi Everyone, How can i put errorbars in my figure below (Between red and green graphs)?
댓글 수: 0
채택된 답변
Star Strider
2014년 7월 25일
Use the errorbar function on the line of your choice. The easiest way to do this is to plot that line, then use hold to plot the others:
figure(1)
errorbar(Traffic, EngsetPb, barvector)
hold on
plot( ... the rest ... )
hold off
grid
Hypothetical variables here.
댓글 수: 5
추가 답변 (2개)
Wayne King
2014년 7월 25일
편집: Wayne King
2014년 7월 25일
Do you have the Statistics Toolbox?
x = 1:10;
y = sin(x);
e = std(y)*ones(size(x));
plot(x,y,'b')
hold on
errorbar(x,y,e,'bo','markerfacecolor',[0 0 1])
Not sure exactly what you mean by "between red and green graphs"
I'm assuming that each data point is an estimate and you have an associated confidence inteval that you want to represent
댓글 수: 2
Wayne King
2014년 7월 25일
Presumably this probability comes with some associated error, you just want to use that error in errorbar()
참고 항목
카테고리
Help Center 및 File Exchange에서 Errorbars에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!