I have the discrete impulse response of a filter and i want to determine which kind of filter it is by using the DFT.

The impulse response is:

h0 = [0,1,2,1,0]

which I zero-pad for a better result

N0 = 10;
h1 = [zeros(1,N0),h0, zeros(1, N0)];

Then i created the N-Point DFT of it using FFT

H1 = fft(h1);

The picture shows the plot of abs(H1) FFT of the given zero-padded impulse response

Now i know that k1 = 0 represents the steady component and at first I thought that this is the spectrum of a band-stop filter but now that I read a little bit more about the DFT I'm not quite sure because the DFT is always mirrored for real signals.

So my question is: Do I have to use only one half of the DFT spectrum to determine the filter characteristics? (Which would mean that this is a low-pass filter?)


2 Answers 2


The $k_1$ indexes you get from the FFT correspond to frequencies 0 to $2\pi$ (actually, 1 sample short of $2\pi$). Note that frequencies in the range $\pi$ to $2\pi$ also correspond to the negative half of the specturm ($-\pi$ to 0).

You can get a nice visualisation with frequency 0 in the middle by applying fftshift to the result (Octave or Matlab assumed).

You can also check freqz, which plots a nice frequency and phase repsonse (try freqz([1 2 1], [1])). Or try plot(abs(freqz([1 2 1],[1]))) to get a linear plot rather than log.

What you are getting is a low-pass filter (gain 4 at low frequency, 0 at high frequency).

In VERY general terms: You can know beforehand it is a LPF because the impulse response is a single bump. A high-pass filter will have some sort of antisymetric shape (like [1 2 -2 -1]), and a band-pass or band-reject will have some oscillations in the impulse response.


You are getting a band pass filter. The coefficients of the filter are the ones that you are getting from the impulse response. The frequencies are folding around the f/2 or "the 0", where the imaginary values of the transform are anti symmetric (negative for half of the values).

  • $\begingroup$ This is definitely not a band pass filter but a low pass filter. $\endgroup$
    – Matt L.
    May 16, 2015 at 19:29
  • $\begingroup$ Yes, you are right. Just misspelled... but I hope you understand what I am trying to tell you $\endgroup$
    – Moti
    May 17, 2015 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.