필터 지우기
필터 지우기

Frequency domain of wvtool - how to replicate?

조회 수: 5 (최근 30일)
Andy
Andy 2016년 8월 12일
편집: Andy 2016년 8월 15일
I'm trying to obtain the frequency domain (in dB) data of a Kaiser window and I'm unable to duplicate what results from the "wvtool". My code is below. Why does my fft plot not show all the side lobes that are shown in the Frequency Domain of the wvtool GUI?
if true
% code
end
N=100;
w = window(@kaiser,N,1)
figure(1);subplot(1,2,1);
plot(w);
subplot(1,2,2);
plot(db(abs(fft(w))));axis([0 50 -80 40]);
wvtool(w)

채택된 답변

Honglei Chen
Honglei Chen 2016년 8월 12일
You need more points in there. The default is probably 512 or 1024. Try
plot(db(abs(fft(w,1024))));axis([0 50 -80 40]);
HTH
  댓글 수: 1
Andy
Andy 2016년 8월 15일
편집: Andy 2016년 8월 15일
Thank you. And just to add a detail - I need to change the "axis" properties to see all the extra lobes:
if true
% code
end
plot(db(abs(fft(w,1024))));axis([0 512 -80 40]);

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Windows에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by