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

Star Strider
Star Strider 2019년 10월 28일
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 2019년 10월 30일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Signal Processing Toolbox에 대해 자세히 알아보기

질문:

2019년 10월 28일

댓글:

2019년 10월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by