| Filter Design Toolbox | ![]() |
Construct a linear interpolator filter object
Syntax
Description
hm = mfilt.linearinterp(l)
returns an FIR linear interpolator hm with an integer interpolation factor l. l must be an integer. The default value for l is 2 when you do not include the input argument l.
Input Arguments
Entries in the following table describe the input arguments for mfilt.linearinterp.
mfilt.linearinterp 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.linearinterp objects.The next table describes each property for an mfilt.linearinterp filter object.
Examples
Interpolation by a factor of 2 (used to convert the input signal sampling rate from 22.05 KHz to 44.1 KHz).
l = 2; % Interpolation factor hm = mfilt.linearinterp(l); 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(2:45),'r') xlabel('Time (sec)');ylabel('Signal Value')
See Also
mfilt.holdinterp, mfilt.firinterp, mfilt.firfracinterp, mfilt.cicinterp, mfilt.cicinterpzerolat
| mfilt.holdinterp | min | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |