Date: Jan 4, 2013 2:59 PM
Author: Daniel Robbins
Subject: Errorbars in a dataset
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