| Filter Design Toolbox | ![]() |
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.
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.
Examples
Convert an input signal from 44.1 KHz to 22.05 KHz using decimation by a factor of 2.
m = 2; % Decimation factor hm = mfilt.firdecim(m); % Use the default filter fs = 44.1e3; % Original sampling frequency: 44.1khz n = 0:10239; % 10240 samples, 0.232 second long % signal x = sin(2*pi*1e3/fs*n); % Original signal, sinusoid at 1khz y = filter(hm,x); % 5120 samples, still 0.232 seconds stem(n(1:44)/fs,x(1:44)) % Plot original sampled at 44.1 KHz hold on % Plot decimated signal (22.05 KHz) % in red stem(n(1:22)/(fs/m),y(13:34),'r','filled') xlabel('Time (sec)');ylabel('Signal Value')
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 |