Filter Design Toolbox    
mfilt.firdecim

Construct a a direct-form FIR polyphase decimator filter object

Syntax

Description

hm = mfilt.firdecim(m) returns a direct-form FIR polyphase decimator object hm with an decimation factor of m. A low-pass Nyquist filter of gain 1 and cutoff frequency of /m is designed by default.

hm = mfilt.firdecim(m,num) uses the coefficients specified by num for the decimation filter. This lets you specify more completely the FIR filter to use for the decimator.

Input Arguments

The following table describes the input arguments for creating hm.

Input Argument
Description
m
Decimation factor for the filter. m specifies the amount to reduce the sampling rate of the input signal. It must be an integer. When you do not specify a value for l it defaults to 2.
num
Vector containing the coefficients of the FIR lowpass filter used for decimation. When num is not provided as an input, mfilt.firdecim constructs a lowpass Nyquist filter with gain equal to 1 and cutoff frequency equal to /m by default.

mfilt.firdecim Object Properties

Every multirate filter object has properties that govern the way it behaves when you use it. Note that many of the properties are also input arguments for creating mfilt.firdecim objects.The next table describes each property for an mfilt.firdecim filter object.

Name
Values
Description
FilterStructure
String
Reports the type of filter object, such as a decimator or fractional integrator. You cannot set this property--it is always read only and results from your choice of mfilt object.
Numerator
Vector
Vector containing the coefficients of the FIR lowpass filter used for interpolation.
DecimationFactor
Integer
Decimation factor for the filter. m specifies the amount to reduce the sampling rate of the input signal. It must be an integer.
NonProcessedSamples
0
Shows the values of the samples that were not processed during the filtering operation. Note that this is not the number of samples that were not processed.
ResetBeforeFiltering
'off' or 'on'
Determine whether the filter states get restored to their starting values for each filtering operation. The starting values are the values in place when you create the filter if you have not changed the filter since you constructed it. ResetBeforeFiltering returns to their default values any state that the filter changes during processing. States that the filter does not change are not affected.
States
Matrix
Stored conditions for the filter, including values for the decimator states.
NumSamplesProcessed
Integer
Returns the number of samples processed during filtering. As a check, the number of samples reported processed plus the number of nonprocessed samples should be the total number of input samples.

Examples

Convert an input signal from 44.1 KHz to 22.05 KHz using decimation by a factor of 2.

See Also

mfilt.firtdecim, mfilt.firfracdecim, mfilt.cicdecim, mfilt.cicdecimzerolat


  mfilt.fftfirinterp mfilt.firfracdecim 

Learn more about the latest releases of MathWorks products:

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS