# What version of sinc function to use ? (With additional factor of $\pi$ or not.)

I have an exam tomorrow on Signal Processing and one of the questions can go two ways:

1. Use a Hamming window to design an Nth th order (N+1 tap) band pass FIR filter with a pass-band between $$f_0$$-$$f_1$$ and a sampling frequency of $$f_s$$Hz

2. Following the windowing method of FIR filter design, use a Hamming window to design a Nth order (N+1-tap) FIR lowpass filter with a cut-off frequency of $$f_0$$ Hz and a sampling rate of $$f_s$$Hz.

Now I have a slight problem with how the questions are answered in Mark Scheme for previous paper. For the band pass he uses this definition of $$sinc$$: $$sinc(x)=\frac{sin(\pi x)}{\pi x}$$

While for the low pass he uses $$sinc(x)=\frac{sin(x)}{x}$$

Here are the extracts:  Even in the first case he states that But then his answers for $$h[n]$$ follow the $$\pi x$$ version of the sinc. I have a suspicion that he used matlab to evaluate the numbers and matlab in fact is using the $$\frac{sin(\pi x)}{\pi x}$$. During the lectures the only way we were taught to define sinc was in the "normal version" without $$\pi$$.

But then again looking at Wiki article about sinc. It states that the version with $$\pi$$ is commonly used in signal processing. Could someone tell me what to use and when? Thanks.

There's no what to use when. It's all a matter of definition and they must be made explicit for responsible, trustable, serious conversations.

From the DSP context, if in a paper or in a book or in an exam you are asked to use the sinc function, then if nothing else is stated you should assume:

$$\text{sinc(x)} = \frac{ \sin(\pi x)} {\pi x }$$

Any other use of the so called sinc function should be preceeded by an explicit definition of the particular choice.

• Thanks. Sorry for perhaps trivial questions but I am very new to signal processing and there is a lot of things thrown at me at once. Jan 13 '19 at 19:47
• It's ok... We all had similar confusions this or that way at the beginning... Jan 13 '19 at 20:04

Some time ago, on our sister site math.SE, I wrote about this issue regarding the two different definitions of the sinc function. Here is a slightly modified version of that answer for the benefit of those who prefer to just stay on dsp.SE.

In the engineering literature, those who define the Fourier transform as $$X(\omega) = \int_{-\infty}^{\infty} x(t)\exp(-j\omega t)\ \mathrm dt$$ tend to use the unnormalized version $$\frac{\sin(x)}{x}$$, while those who define the Fourier transform as $$X(f) = \int_{-\infty}^{\infty} x(t)\exp(-j2\pi f t)\ \mathrm dt$$ tend to use the normalized version $$\frac{\sin(\pi x)}{\pi x}$$. My personal preference is for the normalized version because the zeroes of the function are the nonzero integers, but, like most people, I have learned to live with both definitions and figure out which one an author is using even if it is not explicitly stated. There are, of course, zealots who say that people who use the convention they do not happen to prefer are in a state of sin (or did I mean to say a state of sinc?)

Incidentally, I would like to say that my preference for the definition of the sinc (or sine cardinal) function is $$\mathrm{sinc}(x) = \begin{cases}\frac{\sin(\pi x)}{\pi x}, & x \neq 0,\\ 1, & x = 0,\end{cases}$$ and not simply $$\mathrm{sinc}(x) = \sin(\pi x)/(\pi x)$$ the way the OP and Wikipedia states it.

I do disagree with Fat32's didactic assertion that if sinc is not defined in a paper or book or on an exam or homework, then one should assume that it is the normalized version that is meant and proceed accordingly. In my experience, it is more commonly the case that if the frequency variable is $$\omega$$ (radians per second), then the unnormalized version is used while if the frequency variable is $$f$$ (Hertz), then the normalized version is used, but this is by no means a hard and fast rule that everyone follows.