Get states from a fdesign.bandpass object and use in filter function
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi all,
I designed several bandpasses using
hband = fdesign.bandpass(....)
Hband = design(hband,'cheby1','MatchExactly','passband');
What I want to do is split the input in frequency bands and filter each with a FIR filter. This works fine but the problem is the bandpass - I have a long signal and I chop it in 1024 sample frames. I therefore need to save the states of each filter and use them in the next iteration. This works for the FIR filters using the standard
[y,zf] = filter(b,a,X,zi).
However, I can't do that with Hband. How can I return an update of the Hband states from the filter function for further use? I assume that Hband(i).states has something to do with it, however it doesn't seem to change at all. It's my first time doing this and I'm not familiar with second order section IIR filter cascades etc., so any help would be highly appreciated.
Nemanja
댓글 수: 0
채택된 답변
Wayne King
2012년 5월 17일
After you design your filter, set the PersistentMemory property of the object to true.
d = fdesign.bandpass;
Hd = design(d,'cheby1');
Hd.PersistentMemory = true;
Hd
Now you see the states. Apply your filter to some data.
y = filter(Hd,randn(1024,1));
% view the states
Hd
추가 답변 (2개)
참고 항목
카테고리
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!