Question: ErrorPlot troubles

I have looked at the maple help for the ErrorPlot function, but i can't make it work for my plot. 

I have the following procedure:

K := 1.; Xrng := [seq(dt*i, i = 0 .. ntime)];

value := array(1 .. ntime+1);

ave := array(1 .. ntime+1);

for j to ntime+1 do:

discountfactor := exp(-r*j*dt);

Stot := 0.;

Stot1 := 0.;

for i to npath do:

Spath := max(Spot[i][j]-K, 0);

Stot := Stot+Spath;

Stot1 := Stot1+Spot[i][j]:

end do;

value[j] := Stot*discountfactor/npath:

end do:

 

and i would like to plot the following with error bars:

p2 := LineChart(value, xcoords = Xrng)      (plotting the value[j]'s from my procedure)

 

Will ErrorPlot not work for a procedure?

Thank you!

Please Wait...