Hi, I am trying to create the equivalent of the octave/matlab "filter" function in my project.
Until now I have achieved to translate y = filter(b,1,x), but now I also need the second vector that is returned from the filter function, i.e. [y,z] = filter(b,1,x).
Do you know I can get z?
Hi, thanks for using SigPack. I guess that the reason for you to add the internal states (z) from the filter is that you will call this function at different times and that it will have a "warm" start with the previous filter state. Actually this is already handled in SigPack since the filter itself is a class and the internal state will be encapsulated within the class between calls of filter() or the filter operator. BR Claes
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I am trying to create the equivalent of the octave/matlab "filter" function in my project.
Until now I have achieved to translate
y = filter(b,1,x)
, but now I also need the second vector that is returned from the filter function, i.e.[y,z] = filter(b,1,x)
.Do you know I can get
z
?This is how I have achieved
y = filter(b,1,x)
:Edit: after I get
z
I have to use it as the fourth argument of the filter, i.e.[y2,z2] = filter(b,1,x,z)
. Is this supported?Last edit: Marco 2020-03-24
Hi, thanks for using SigPack. I guess that the reason for you to add the internal states (z) from the filter is that you will call this function at different times and that it will have a "warm" start with the previous filter state. Actually this is already handled in SigPack since the filter itself is a class and the internal state will be encapsulated within the class between calls of
filter()
or the filter operator. BR Claes