function z=krect(x,y)

% KRECT       Rectangular Kernel Function for univariate data.

if nargin==1,
  z=(abs(x)<1)/2;
  elseif nargin==2,
    z=krect(x).*krect(y);
end;