problem with error bar

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

 Respuesta aceptada

Wayne King
Wayne King el 1 de Oct. de 2011

0 votos

e = std(y)*ones(size(y));

1 comentario

Wayne King
Wayne King el 1 de Oct. de 2011
As in:
x = 1:10;
y = randn(10,1);
e = std(y)*ones(10,1);
errorbar(x,y,e)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 1 de Oct. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by