フィルターのクリア

Using iirnotch for more than one frequency?

3 ビュー (過去 30 日間)
Dick Rusell
Dick Rusell 2014 年 9 月 26 日
回答済み: Rick Rosson 2014 年 9 月 27 日
I'm currently using iirnotch to filter out 120Hz as seen here
Wo = 120/(960/2); BW = Wo/35;
[b,a] = iirnotch(Wo,BW);
figure;
Y = filter(b,a,noisyEMG);
plot(Y);
figure;
pwelch(Y);
But I also need to filter 240Hz, do I need to run it through iirnotch again or is there an easier way?

採用された回答

Rick Rosson
Rick Rosson 2014 年 9 月 27 日
Fs = 960;
Fc = [ 120 240 ];
Wc = Fc/(Fs/2);
BW = Wc/35;
mycomb = zeros(2,6);
[b,a] = iirnotch(Wc(1),BW(1));
mycomb(1,:) = [b,a];
[b,a] = iirnotch(Wc(2),BW(2));
mycomb(2,:) = [b,a];
Y = sosfilt(mycomb,noisyEMG);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatched Filter and Ambiguity Function についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by