How can I plot 2 graphs with errorbar each one?

조회 수: 14 (최근 30일)
Jonathan Bijman
Jonathan Bijman 2019년 6월 13일
댓글: Jonathan Bijman 2019년 6월 13일
Dear community
I'm plotting 2 graphs and I want to put errorbar in each plot.
How can I do that?
Thanks!

채택된 답변

dpb
dpb 2019년 6월 13일
Use errorbar and hold on or as per the documentation, if y is a matrix errorbar plots a separate line for each column.
  댓글 수: 4
dpb
dpb 2019년 6월 13일
편집: dpb 2019년 6월 13일
Why are you using plot to draw the same data as are drawn with errorbar?
x = linspace(0, 50, numel(Voc_C)); % x points vector (row)
X = [x;x].'; % 2-column X to plot against
Y = [Voc_C(:) Voc_D(:)]; % 2-column Y to plot
err=[Voc_desv_C(:) Voc_desv_D(:)]; % 2-column error to plot
errorbar(X,Y,err)
title('Voc Plot')
xlabel('Tiempo (Días)')
ylabel('Voc (V)')
legend('Voc Clean','Voc Dirty');
Jonathan Bijman
Jonathan Bijman 2019년 6월 13일
Thank U so much! it works =)

댓글을 달려면 로그인하십시오.

추가 답변 (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