Creating errorbars in excel
Afficher commentaires plus anciens
I´m trying to create a column graph with errorbars in excel from matlab, but I can´t find how to set the length of the error bars.
I think I know the method I should use, but I keep getting the error ??? No method 'ErrorBar' with matching signature found for class 'Interface.0002086B_0000_0000_C000_000000000046'.
even though 'ErrorBar' shows up as a method when I use methods() (the output is (Variant ErrorBar(handle, XlErrorBarDirection, XlErrorBarInclude, XlErrorBarType, Variant(Optional))
this is a part of the code I use:
------------------------------------------------------------ e = actxserver('excel.application'); eWs = e.Workbooks; eW = eWs.Add; eS = eW.ActiveSheet; e.Visible = 1;
%%
x=(0:2:10)';
eS.Range('A1:C6').Value = [x]; eCO = eS.ChartObjects.Add(100, 30, 400, 250); eC = eCO.Chart; eC.SeriesCollection.NewSeries;
eC.SeriesCollection(1).Value = eS.Range('A1:A6'); eC.SeriesCollection(1).HasErrorBars = 1; -------------------------------------------------------------------
to find the method I used methods(eC.SeriesCollection(1), '-full').
I found this site: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.series.errorbar.aspx which I think is about what I need but I can't figure it out.
Would be really gratefull if someone can help me.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Errorbars dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!