Main Content

int

States from CIC filter

Compatibility

mfilt will be removed in a future release. Refer to the reference page for a specific mfilt object to see its recommended replacement.

Syntax

integerstates = int(hm.states)

Description

integerstates = int(hm.states) returns the states of a CIC filter in matrix form, rather than as the native filtstates object. An important point about int is that it quantizes the state values to the smallest number of bits possible while maintaining the values accurately.

Examples

For many users, the states of multirate filters are most useful as a matrix, but the CIC filters store the states as objects. Here is how you get the states from you CIC filter as a matrix.

hm = mfilt.cicinterp;
hs = hm.states; % Returns a FILTSTATES.CIC object hs.
states = int(hs); % Convert object hs to a signed integer matrix.

After using int to convert the states object to a matrix, here is what you get.

Before converting:

hm.states
 
ans =
 
    Integrator: [2x1 States]
          Comb: [2x1 States]

After the conversion and assigning the states to states:

states

states =

           0           0
           0           0

Version History

Introduced in R2011a