function shadecurves3(f, g, a, b)
%SHADECURVES  Draws the region between two curves
%   SHADECURVES(f, g, a, b) inputs two functions f
%   and g, plots them between x = a and x = b, and
%   shades the region in between.
%   Example: shadecurves(@sin, @(x) -sin(x), 0, pi)
fv = str2func(vectorize(func2str(f)));
gv = str2func(vectorize(func2str(g)));
xvals = linspace(a, b, 5); 
fill([xvals xvals], [fv(xvals) gv(xvals)], [.8 0 1])