function out = sinc(x) % Deal with the removable singularity at 0 explicitly. out = sin(pi*x)./(pi*x); out(x == 0) = 1; end