1
votes

I'm having two zero padded signals in Matlab

h_1[n] = {...,0,0,1,2,1,0,0,...} 
h_2[n] = {...,0,1,0,2,0,1,0,...}

and below you can see their FFT plots:

% N1 and N2 are just the lengths of h1 and h2.
H1 = fft(h1, N1); 
H2 = fft(h2, N2);

% ...

figure;
from = -floor(length(H1)/2);
to   = floor(length(H1)/2);
stem(from:to, abs(H1));

enter image description here

enter image description here

My question is how one can decide whether those are low-,high- or band-pass filters.

I know FFT decomposes my functions of time, here h_1[n] and h_2[n], into the frequencies of which they are made up: H_1[k] and H_2[k] if I got that right but so far those plots tell me almost nothing.

So how does one interpret those plots? I don't know why we had to add more zeros to h_2[n], could this be to have a higher sampling rate?

Thank you for any explanation!

2

2 Answers

0
votes

I'm not 100% sure what you are using to generate those plots.

Generally - if you convert the FFT to a polar format it's much easier to interpret. You end up with one graph for the phase response and one for the frequency response.

I'd recommend a read of this: http://www.dspguide.com/ch8/8.htm

However I think the first one will be a high pass filter (low value at low frequencies, higher value at high frequencies).

If I'm reading your graph right then the second one looks like a band reject?

Polar vs Rectangular Plotshttp://www.dspguide.com/ch8/8.htm

0
votes

(1) the padded 0s in the two signals are equivalent to interpolation in the frequency domain, thus you can see the denser spectra in the figures.

(2) about h_1[n] and h_2[n], h_2[n] can be treated as an upsampling version of h_1[n] with factor 2, then you can see two replica of the original spectra in the frequency domain.

please refer to "multi-rate signal processing" in digital signal processing textbooks.