function rsummer(f,n)
%RSUMMER Evaluate and display Riemann sum.
%	RSUMMER('expr',n) displays a graph of the Riemann sum
%	for 'expr' using n points on [0,1].

%	Copyright (c) 1993-95 by The MathWorks, Inc.
%	$Revision: 1.6 $  $Date: 1995/03/01 21:38:55 $

x = (1:n)/n;
y = eval(vectorize(f));
r = sum(y)/n;
bar(x,y)
title([f '  :  ' sprintf('%9.6f',r)])
xlabel(int2str(n))
axis([0 1 min(0,min(y)) max(0,max(y))])
