How can I use the "filtfilt" function with a "dffir" filter object created using Filter Designer (fdatool)?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 21 de Dic. de 2016
Respondida: MathWorks Support Team
el 9 de En. de 2017
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?
Respuesta aceptada
MathWorks Support Team
el 21 de Dic. de 2016
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Filter Design en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!