function y=dir_kern(t,N)
y=(N+1/2)*ones(size(t))/pi;
indx=find(sin(t/2)~=0);
y(indx)=sin((N+1/2)*t(indx))./(2*pi*sin(t(indx)/2));

