Main Content


Create filter System object from discrete-time filter


hs = sysobj(hfilt)


hs = sysobj(hfilt) creates a new filter System object™ hs from the dfilt object, hfilt.

The function supports a subset of dfilt objects. The following table lists supported filter structures for hfilt and the filter System object that the function creates.

Single-rateFilter System object
Lattice AR(dfilt.latticear)dsp.AllpoleFilter
Coupled-allpass, power-complementary lattice filter (dfilt.calatticepc)dsp.CoupledAllpassFilter
Coupled-allpass, lattice filter (dfilt.calattice)dsp.CoupledAllpassFilter
Cascade of discrete time filters (dfilt.cascade)dsp.CoupledAllpassFilter
Direct Form I (dfilt.df1)dsp.IIRFilter
Direct Form I transposed (dfilt.df1t)dsp.IIRFilter
Direct Form II (dfilt.df2)dsp.IIRFilter
Direct Form II transposed (dfilt.df2t)dsp.IIRFilter
Direct-form FIR (dfilt.dffir)dsp.FIRFilter
Direct-form FIR transposed (dfilt.dffirt)dsp.FIRFilter
Direct-form symmetric FIR (dfilt.dfsymfir)dsp.FIRFilter
Direct-form antisymmetric FIR (dfilt.dfasymfir)dsp.FIRFilter
Discrete-time, lattice, moving-average (dfilt.latticemamin)dsp.FIRFilter
Discrete-time, second-order section, direct-form I (dfilt.df1sos)dsp.BiquadFilter
Discrete-time, second-order section, direct-form I transposed (dfilt.df1tsos)dsp.BiquadFilter
Discrete-time, second-order section, direct-form II (dfilt.df2sos)dsp.BiquadFilter
Discrete-time, second-order section, direct-form II transposed (dfilt.df2tsos)dsp.BiquadFilter

Input Arguments


Discrete-time filter (dfilt) object. The preceding table lists supported filter structures.

If hfilt is a discrete-time filter with the PersistentMemory property set to true, then the filter states are copied into the initial conditions properties of hs. Otherwise, initial conditions are ignored.

The function does not support some properties for SOS filter structures:

  • If the CastBeforeSum property is set to false, the function issues a warning. dsp.BiquadFilter System objects always have a cast before a sum.

  • If the Signed property is false, the function issues an error. dsp.BiquadFilter System objects do not support unsigned arithmetic.

Output Arguments


Filter System object. The function maps almost all properties of hfilt into the filter System object. However, some properties are not mapped exactly:

  • Filter System objects do not have a CoeffAutoScale property. The function specifies a word length and a fraction length regardless of whether the CoeffAutoScale property of hfilt is true or false.

  • dsp.BiquadFilter System objects do not have a FullPrecisionOverride property. Full-precision values in hfilt are mapped to word and fraction lengths in hs. These settings correspond to the full-precision setting of the input data type.


collapse all

hfilt = dfilt.df1sos; %Direct-form I SOS
hs = sysobj(hfilt)   %Biquadratic IIR filter
hs = 
  dsp.BiquadFilter with properties:

                       Structure: 'Direct form I'
                 SOSMatrixSource: 'Property'
                       SOSMatrix: [1 0 0 1 0 0]
                     ScaleValues: [2x1 double]
      NumeratorInitialConditions: 0
    DenominatorInitialConditions: 0
        OptimizeUnityScaleValues: true

  Show all properties

Introduced in R2012a