function x = desmat(vx,xc,p) 
% DESMAT, Creates a DESign MATrix for polynomial regression
%     for col. vector of x's in vx,
%          scalar centerpoint xc,
%          polynomial degree p
%     For use in NonParametric Regression MOVies

%    Copyright (c) J. S. Marron and D. Ruppert, 1997


x = ones(length(vx),1) ;
vxc = vx - xc ;
if p > 0 ;
  for j = 1:p ;
    x = [x, (vxc .* x(:,size(x,2)))] ;
  end ;
end ;




