function a = evalbasis(j,x)
%
% evaluate basis function j at the point x
%
  switch j
    case 1
      a = 1;
    case 2
      a = x;
    case 3
      a = x^2;
    case 4
      a = x^3;
    otherwise
      disp(['Error: no such basis function ' j])
      a = nan;
  end;
