Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Just one errorbar!

Subject: Just one errorbar!

From: Sebastian Gatzka

Date: 20 Jan, 2009 18:11:02

Message: 1 of 2

Hello people.

I have a series of mean-data from which only one has a recognizable standard deviation.
Is there a possibility to plot the whole series with just the one having an error bar?
I tried it with errobar(x,y,h) with h being 0 for all the entries with negligible standard deviation.
But this produces small artefacts of error bars in the plot with 0 size.
It doesn't look very well.

Do you have any idea how I can solve this?

Thanks in advance. S.

Subject: Just one errorbar!

From: Jos

Date: 20 Jan, 2009 21:07:01

Message: 2 of 2

"Sebastian Gatzka" <sebastian.gatzka.NOSPAM@stud.tu-darmstadt.de> wrote in message <gl543m$b93$1@fred.mathworks.com>...
> Hello people.
>
> I have a series of mean-data from which only one has a recognizable standard deviation.
> Is there a possibility to plot the whole series with just the one having an error bar?
> I tried it with errobar(x,y,h) with h being 0 for all the entries with negligible standard deviation.
> But this produces small artefacts of error bars in the plot with 0 size.
> It doesn't look very well.
>
> Do you have any idea how I can solve this?
>
> Thanks in advance. S.

Set all negligible values to NaN:

x = 1:10 ;
y = rand(size(x)) ;
e = rand(size(x)) ;

e(e < mean(e)) = NaN ;
errorbar(x,y,e)

hth
Jos

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us