# Discrete Fourier Transform on Impulses?

So I'm used to DFT being on an equation like this:

x(n) = cos(n), ∀n , with window n = 0,1,2

I can clearly plot discrete values and take a DFT to find Xk

But I found this equation on a past exam that's like this

x(n) = δ(n+2) +δ(n+1)−δ(n−1) with window of length 5.

This appears to be an impulse response to me, and I don't understand how one would take a DFT of it?

• In the discrete world, an impulse is not infinite. $\delta(0)=1$. – Yves Daoust Sep 8 '15 at 7:39
• So what would δ(n+1) and n-1 be then? Would those all be zero? – flyingtiger3 Sep 8 '15 at 7:41
• $\delta(\ne0)=0$ as usual. – Yves Daoust Sep 8 '15 at 7:45
• Why all zeroes ? – Yves Daoust Sep 8 '15 at 8:08
• Wait sorry. If n = 2, 1, 0, -1, -2 (window of length 5) my corresponding vector used for DFT (np.fft) should be [0 1 0 1 1]? Because only for n = 0 will . δ(0)=1. and that happens at 1, -1, -2? – flyingtiger3 Sep 8 '15 at 8:12

For digital signals, you represent the $s(n) = \delta(n)$ dirac impulse by

$$s[n] = \delta_\text{discrete}[n] = \begin{cases} 0& \forall n \ne 0\text,\\ 1 & n = 0 \end{cases}\tag{*}$$

which is obvious if you think about the dirac impulse of having the function (in continuous math) to give you

$$\int\limits_{-\infty}^\infty f(x)\delta_\text{continuous}(x) dx = f(x)$$

and in the discrete case, your integral collapses to the sum of

$$\sum\limits_{-\infty}^\infty f[x]\delta_\text{discrete}[x] dx \overset!= f[x] \tag{\dagger}$$

The only function that fulfills $(\dagger)$ is $\delta$ from $(\text *)$.

http://www.coe.utah.edu/~cs4640/slides/Lecture14.pdf

so basically if its a series of pulses then the fourier transform would be a series of another pulses, if its just these pulses then fourier transform will be a series of pulses, containing a lot of frequencies...