What is the algorithm used by freqz?

조회 수: 3 (최근 30일)
Fernando
Fernando 2011년 7월 8일
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.

답변 (1개)

Paulo Silva
Paulo Silva 2011년 7월 8일
edit freqz
and see how it works

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by