function shadecurves2(f, g, a, b)
%shadecurves takes strings or expressions f and g,
% interprets them as functions, plots them between
% x = a and x = b, and shades the region in between.
% Example: shadecurves2('sin(x)', '-sin(x)', 0, pi)
ffun = inline(vectorize(f)); gfun = inline(vectorize(g));
xvals = a:(b - a)/50:b;
patch([xvals, xvals], [ffun(xvals), gfun(xvals)], [0.2, 0, 0.8])
