What is the algorithm used by freqz?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have taken a look at the help pages of fft and frezq but I am still unclear.
The function fft computes a DFT fast; if I fft a sinusoid whose frequency is an multiple of 1/N (where N is the signal length) I get back a N-length signal that contains two bins equal to N/2 while all other bins contain quantization noise. Now, if I freqz the same signal with N points, I get spectral leakage all around the place. For example,
cos_signal = cos(2*pi*[0:1:1023]/8); h1=fft(cos_signal); plot(20*log10(abs(h1)/max(abs(h1))));
Gives a spectrum with two discrete deltas, and zero (ie quantization error), everywhere else.
If I call freqz(cos_signal), which supposedly uses 512 frequency points, I get the same thing as with fft (even though the fft was a 1024 point fft). However, if I call freqz(cos_signal,1,1024), I get spectral leakage.
I would appreciate an explanation with the implementation details of freqz.
Thanks,
Fernando.
0 Kommentare
Antworten (1)
Siehe auch
Kategorien
Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!