| Filter Design Toolbox | ![]() |
Construct an mfilt object for decimation based on a direct-form transposed FIR filter structure
Syntax
Description
hm = mfilt.firtdecim(m)
returns a polyphase decimator mfilt object hm based on a direct-form transposed FIR structure with a decimation factor of m. A low-pass Nyquist filter of gain 1 and cutoff frequency of
/m is designed by default.
hm = mfilt.firtdecim(m,num)
uses the coefficients specified by num for the decimation filter. num is a vector containing the coefficients of the transposed FIR lowpass filter used for decimation. If omitted, a low-pass Nyquist filter with gain equal to 1 and cutoff frequency of
/m results by default.
Input Arguments
The following table describes the input arguments for creating hm.
mfilt.firtdecim 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.firtdecim objects.The next table describes each property for an mfilt.firtdecim filter object.
Examples
Demonstrate decimating an input signal be a factor of 2, in this case converting from 44.1 KHz down to 22.05 KHz.
m = 2; % Decimation factor hm = mfilt.firtdecim(m); % We use the default filter coeffs fs = 44.1e3; % Original sampling frequency: 44.1 KHz n = 0:10239; % 10240 samples, 0.232 second long signal x = sin(2*pi*1e3/fs*n); % Original signal, sinusoid at 1 KHz 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.firdecim, mfilt.firfracdecim, mfilt.cicdecim, mfilt.cicdecimzerolat
| mfilt.firsrc | mfilt.holdinterp | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |