www.gusucode.com > dsp 案例源码程序 matlab代码 > dsp/UpsampleAndInterpolateWithIIRHalfbandInterpolatorExample.m
%% Upsample and Interpolate Multichannel Input with IIR Halfband Interpolator % Create a half-band interpolation filter for data sampled at 44.1 kHz. % The filter order is 51 with a transition width of 4.1 kHz. Use the filter % to upsample and interpolate a multichannel input. % Copyright 2015 The MathWorks, Inc. Fs = 44.1e3; filterspec = 'Filter order and transition width'; Order = 51; TW = 4.1e3; iirhalfbandinterp = dsp.IIRHalfbandInterpolator(... 'Specification',filterspec,... 'FilterOrder',Order,... 'TransitionWidth',TW,... 'SampleRate',Fs); x = randn(1024,4); y = step(iirhalfbandinterp,x);