function f=fyrpuls(t,N)

if( nargin < 2 )
  N = 1;
end

f=abs(t)<.5;

for n=1:N-1
  f=f+(abs(t-2*n)<.5)+(abs(t+2*n)<.5);
end