| Filter Design Toolbox | ![]() |
Construct an FIR filter-based interpolator mfilt object
Syntax
Description
hm = mfilt.firinterp(l)
returns an FIR-based interpolator object hm with an interpolation factor of l. A low-pass Nyquist filter of gain l and cutoff frequency of
/l is designed by default when you do not include l as an input.
hm = mfilt.firinterp(l,num)
uses the coefficients specified by num for the numerator coefficients of the interpolation filter.
Input Arguments
The following table describes the input arguments for creating hm.
mfilt.firinterp 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.firinterp objects.The next table describes each property for an mfilt.firinterp filter object.
Examples
In this example, use mfilt.firinterp to double the sample rate of a 22.05 KHz input signal. The output signal ends up at 44.1 KHz. Although l is set explicitly to 2, this represents the default value for mfilt.firinterp objects.
l = 2; % Interpolation factor hm = mfilt.firinterp(l); % We use the default filter fs = 22.05e3; % Original sampling frequency: 22.05 KHz n = 0:5119; % 5120 samples, 0.232 second long signal x = sin(2*pi*1e3/fs*n); % Original signal, sinusoid at 1 KHz y = filter(hm,x); % 10240 samples, still 0.232 seconds stem(n(1:22)/fs,x(1:22),'filled') % Plot original sampled at % 22.05 KHz hold on; % Plot interpolated signal (44.1 KHz) in red stem(n(1:44)/(fs*l),y(25:68),'r') xlabel('Time (sec)');ylabel('Signal Value')
See Also
mfilt.holdinterp, mfilt.linearinterp, mfilt.fftfirinterp, mfilt.firfracinterp, mfilt.cicinterp, mfilt.cicinterpzerolat
| mfilt.firfracinterp | mfilt.firsrc | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |