Question: How can I put unequal error bars on an ErrorPlot in Maple?

I have the following Maple code.

 

x := [5, 10, 15, 20];

y := [4.22, 7.49, 12.24, 19.60];  

yui := [2.48, 3.76, 6.11, 14.60];

yli := [2.27, 3.34, 6.09, 10.90];

 

with(Statistics): with(plots):

p1 := ErrorPlot(y, coords = x, yerrors = yui);

this produces a plot with error bars. The problem is that I acutally have unequal errors. In the ErrorPlot helpfile it says:

"This options specifies errors along the x-axis. The array of errors must have the same number of elements. To specify right errors and left errors separately, use the list of two vectors." (this pertains to xerrors obviously but below it says the same applies to yerrors)

I have tried entering the code above with yerrors=[yli,yui] and with yerrors={yli,yui}....but neither option works and I get the error:

"Error, invalid input: Statistics:-ErrorPlot expects value for keyword parameter yerrors to be of type {identical(default), [{array, list, rtable, DataFrame, DataSeries}, {array, list, rtable, DataFrame, DataSeries}], {array, list, rtable, DataFrame, DataSeries}}, but received {[2.27, 3.34, 6.09, 10.90], [2.48, 3.76, 6.11, 14.60]}"

Can anyone advise me on what I'm doing wrong - I am very new to Maple.

Jo

 

Please Wait...