function numI = QNC(fname,a,b,m)
%
% Pre:
%   fname    string that names an available function of the
%            form f(x) that is defined on [a,b]. f should
%            return a column vector if x is a column vector.
%     a,b    real scalars 
%       m    integer that satisfies 2 <= m <=11
% Post:
%    numI    the m-point Newton-Cotes approximation of the 
%            integral of f(x) from a to b.
%
   w = WNC(m);
   x = linspace(a,b,m)';
   f = feval(fname,x);
   numI = (b-a)*(w'*f);

  return
end


