The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: errorbars, whiskers length, simple question
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
leo nidas

Posts: 237
Registered: 11/24/07
errorbars, whiskers length, simple question
Posted: Feb 6, 2013 7:10 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi there,

I want to plot some error bars. The code is at the end of this message and runs just fine. I am plotting five errorbars regarding some estimated quantities "ests" and their corresponding confidence intervals that appear in "cis".

The only thing that I do not like is the length of the horizontal whiskers. Why does it differ form errorbar to errorbar? It actually increases if you observe carefully. I would like all errorbars have the same length regarding their horizontal whiskers.

Thanx in advance for any answers!

close all

cis=[0.5563 0.6911;0.5511 0.6946;0.5578 0.7028;0.5667 0.7067;0.5685 0.7132];
hold on
plot(2.5, ests(1),'*k')
plot(5, ests(2),'*k')
plot(7.5, ests(3),'*k')
plot(10, ests(4),'*k')

axis([0 14 0 1])
errorbar(2.5 ,ests(1) ,(ests(1)-cis(1,1)),(cis(1,2)-ests(1)),'k')
errorbar( 5 ,ests(2) ,(ests(2)-cis(2,1)),(cis(2,2)-ests(2)),'k')
errorbar(7.5 ,ests(3) ,(ests(3)-cis(3,1)),(cis(3,2)-ests(3)),'k')
errorbar(10 ,ests(4) ,(ests(4)-cis(4,1)),(cis(4,2)-ests(4)),'k')
errorbar(12.5,ests(5) ,(ests(5)-cis(5,1)),(cis(5,2)-ests(5)),'k')

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.