Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

Topic: Errorbars in a dataset
Replies: 2   Last Post: Jan 8, 2013 6:33 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Daniel Robbins

Posts: 27
Registered: 6/12/12
Errorbars in a dataset
Posted: Jan 4, 2013 2:59 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Does anyone know how to plot errorbars on a line graph from data stored in a dataset?

If I store the data in an array I can produce the graph with the following code:

c7data=xlsread('TFangleTOP.xls');
c7MEAN=mean(c7data);
c7SD=std(c7data);
c7SEM=c7SD./length(c7SD);
s2data=xlsread('TFangleBOTTOM.xls');
s2MEAN=mean(s2data);
s2SD=std(s2data);
s2SEM=s2SD./length(s2SD);
errorbarLOWERzeros = [0 0 0 0];
errorbarUPPERzeros = [0 0 0 0];
xAXIS = [1 2 3 4];
errorbar(xAXIS,c7MEAN,errorbarLOWERzeros, c7SEM,':bo')

However if I store the data in a dataset in the following approach:

ds1 = dataset('xlsfile', 'Ltrap.xls');

I can plot the data using:

datasetfun(@plot,ds1,'DataVars','Fmean')

but I can't seem to figure out how to get errorbars on the chart.

Any help will be greatly appreciated.
Many thanks
Dan




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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.