Great program. I think the last line should be if(nargout>=1) instead of if(nargout>1).
It seems like the program has at most one output argument. It doesn't make much sense to me to specify two output just to get one out.
In fact, MATLAB throws an exception when I tried to specify an output argument. I guess so far everybody does not need the handles :)
14 Dec 2012
Extending ERRORBAR, it plots a line within a shaded area, as 'continuous' confidence/error bounds.