%
%  This function implements a unit rect function
%
%  rect(t/T) = 1 for |t|<T/2, and is zero otherwise
%
function x = unit_rect(t,T);

x = 1*(abs(t)<T/2);

return;