How can I use the "filtfilt" function with a "dffir" filter object created using Filter Designer (fdatool)?
4 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2016 年 12 月 21 日
回答済み: MathWorks Support Team
2017 年 1 月 9 日
How can I use the "filtfilt" function with a "dffir" filter object created using Filter Designer (fdatool)?
I have designed a FIR (finite impulse response) filter using the Filter Designer and I have generated MATLAB code for it. The output of my code, "Hd", is a filter object of type "dffir". How could I apply this filter on some data using the "filtfilt" function?
採用された回答
MathWorks Support Team
2016 年 12 月 21 日
The "filtfilt" function can be executed by inputting the numerator and denominator of a filter, followed by the signal to be filtered. So if you could extract the numerator and denominator of "Hd", you could simply pass these as input arguments to "filtfilt".
The numerator coefficients of "Hd" can be accessed as properties of the filter object with the syntax "Hb.Numerator". Notice that "Hd" is a finite impulse response filter, and hence its denominator coefficient is simply 1.
Based on this information, you could use "filtfilt" with your filter object "Hd" as follows:
y = filtfilt(Hd.Numerator,1,x);
Where "x" is the signal that you are filtering and "y" is the filtered output data.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Filter Design についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!