function y = evalf(n, alpha, x)
%
% evaluate function f at the point x, given
% the coefficients of the n basis functions defining f.
%
  sum = 0;
  for j = 1:n
    sum = sum + alpha(j) * evalbasis(j, x);
  end;
  y = sum;
