フィルターのクリア

lowpassfilter seems not to work

1 回表示 (過去 30 日間)
marie deseyn
marie deseyn 2020 年 4 月 17 日
編集済み: marie deseyn 2020 年 4 月 17 日
My lowpass filter seems to not filter, here's my code
plot(timeth,monosing,'b');
hold on
nafilter = lowpass(monosing,200,fs);
plot(timeth,nafilter,'r');
[f,P] = fourier(timeth,monosing);
[fna,Pna] = fourier(timeth,nafilter);
figure(3);
plot(f,P,'b');
hold on
plot(fna,Pna,'r');
This code should give me a lowpass filter with cutoff frequency 200 Hz but that seems to be not the case since only very high frequencies seem to have a lower amplitude in the fourier spectrum. The function fourier should work fine (already tested with other examples)
Here's the fourier spectrum graph:
  2 件のコメント
Star Strider
Star Strider 2020 年 4 月 17 日
By my calculations, the filter gives about a 15 dB attenuation. It would help to have your signal to experiment with.
Also, I assume ‘fourier’ is a function you wrote yourself. Note that it overshadows the Symbolic Math Toolbox function of the same name. That could be a problem if you want to use it symbolically.
marie deseyn
marie deseyn 2020 年 4 月 17 日
編集済み: marie deseyn 2020 年 4 月 17 日
I guess that I solved it by using the function butter instead, but thanks for the effort

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeDigital and Analog Filters についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by