problem with error bar

1 次查看(过去 30 天)
Villanova
Villanova 2011-10-1
Hi. I want to use errorbar(x,y,std) to get the error bar. I was wondering if x and y are vectors with 10 data point each. how do I write the code for std to have the same matching (10X1) dimension. Thanks

采纳的回答

Wayne King
Wayne King 2011-10-1
e = std(y)*ones(size(y));
  1 个评论
Wayne King
Wayne King 2011-10-1
As in:
x = 1:10;
y = randn(10,1);
e = std(y)*ones(10,1);
errorbar(x,y,e)

请先登录,再进行评论。

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by