Personal Edit of filtfilt function code

Hi
I'm trying apply my personal changes to filtfilt function, to calculate just the output of the center sample? Indeed Im designing a filter with designfilt function, then I apply this filter to a signal, like a sliding window. for example if I have 16000 samples, I use a window of 1001 samples and apply the filter to this window, and just use the 500th sample. then I repeat this construction to a 100 samples window with center of 501th sample., and this has been repeated to the 15500th sample. So I need just the center output of every calculation. So I'm trying to edit htis function.
but I have a problem. I use designfilt function, so I have D coefficients not a,b. when I explore the code of filtfilt function there is not any description to how convert this coefficients to eachother and in the code just worked with a,b coefficients, not D.
anyone has any idea that what should I do?
Sincerely

2 commentaires

Star Strider
Star Strider le 28 Oct 2019
anyone has any idea that what should I do?
First, do not edit filtfilt or any other built-in function.
Do the filtering and then do whatever windowing you want on the filtered signal. (I have no idea exactly what you are doing, so I can offer no specific suggestions.)
mojtaba pourdara
mojtaba pourdara le 30 Oct 2019
I cant do this due to time of execution. I need the filter output for only one sample, but I'm forced to do the filtring on the whole 1000 samples window and this time is so long for me.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by