Discrete-time, direct-form I filter
Hd = dfilt.df1(b,a)
Hd = dfilt.df1
Hd = dfilt.df1(b,a) returns a discrete-time, direct-form I filter, Hd, with numerator coefficients b and denominator coefficients a. The filter states for this object are stored in a filtstates object.
Image of direct form one filter diagram
To display the filter states, use this code to access the filtstates object.
Hs = Hd.states % Where Hd is the dfilt.df1 object and double (Hs) % Hs is the filtstates object
The vector is
Create a direct-form I discrete-time filter with coefficients from a fourth-order lowpass Butterworth design
[b,a] = butter(4,.5); Hd = dfilt.df1(b,a)