function m = tarpw(xgrid) 
% TARPW, Creates a SINE TARget curve (col vector)
%     For use in NonParametric Regression MOVies
%     parameters chosen to look nice on grid [-2,2]x[.5,2]

%    Copyright (c) J. S. Marron, D. Ruppert, E. K. Smith 1999

 %m = (xgrid<-1).* (xgrid+3.0) + ...
 %    (xgrid>-1).* (xgrid<0) .* (1.5*xgrid+2.0)+...
 %    (xgrid>0).* ((xgrid-1).^2+1.0) ;
 
 


m = (xgrid<=-1).* (1.5*xgrid+3.5) + ...
    (xgrid>-1).*(xgrid<=1) .* ((1.3*xgrid).^2+0.5)+...
    (xgrid>1) .* (0.5) ; 
  

