How can I plot 2 graphs with errorbar each one?

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

请先登录,再进行评论。

更多回答(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