problem with error bar

1 vue (au cours des 30 derniers jours)
Villanova
Villanova le 1 Oct 2011
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

Réponse acceptée

Wayne King
Wayne King le 1 Oct 2011
e = std(y)*ones(size(y));
  1 commentaire
Wayne King
Wayne King le 1 Oct 2011
As in:
x = 1:10;
y = randn(10,1);
e = std(y)*ones(10,1);
errorbar(x,y,e)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by