フィルターのクリア

Help with FFT and wvtool

6 ビュー (過去 30 日間)
Leor Greenberger
Leor Greenberger 2013 年 3 月 9 日
Hi All,
I am stumped on this one. I created a filter and used wvtool on it.
w_k = kaiser(K,9.5*pi);
wvtool(w_k)
I then set the analysis parameters as follows:
And I get the plot shown below. I have tried every which way to recreate this myself so that I can calculate the main lobe width of various filters to no avail. Ideally, I want the magnitude normalized and response in dB (see first image), but when I couldn't get those plots, I tried to just copy what I have pasted here. My code is as follows (although I have tried many variations of normalizing the FFT to no avail):
K = 512;
Fs = 1E6;
w_k = kaiser(K,9.5*pi);
W_n = fft(w_k,K);
W_n = W_n(1:K/2+1);
W_n = abs(W_n);
W_n = 2*W_n;
n = 0:1:K/2;
freq_n = Fs*n/K;
figure
plot(freq_n/1E6,W_n);
Thanks for the help!
  3 件のコメント
Honglei Chen
Honglei Chen 2013 年 3 月 10 日
編集済み: Honglei Chen 2013 年 3 月 10 日
Not sure if I understand your issue. In the plots above, the span in time domain is about 0.8 seconds and if you want to sample it with 1 MHz, you need a length of 8e5, not 512. So could you describe what you meant to do?
Leor Greenberger
Leor Greenberger 2013 年 3 月 11 日
Hi Honglei,
I am not sure what the time domain plot is based on, but I set 512 points in the FFT, as shown in the first image, and this is the length I am using in the script.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeWindows についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by