The Interpolator
object interpolates realvalued
inputs using linear or polyphase FIR interpolation.
To interpolate realvalued inputs:
Define and set up your interpolation object. See Construction.
Call step
to interpolate the input
according to the properties of dsp.Interpolator
.
The behavior of step
is specific to each object in
the toolbox.
Note:
Starting in R2016b, instead of using the 
H = dsp.Interpolator
returns
a handle to an interpolation object, H
. The interpolation
method defaults to Linear
and the interpolation
points default to a 5×1 vector.
H = dsp.Interpolator('
returns
an interpolation object, PropertyName
',PropertyValue
,...)H
, with the specified property
name and value pairs.

Source of interpolation points You can select a value of 

Interpolation points This property only applies when you set the The valid range of the values in the interpolation vector is
from 

Interpolation method Specify the interpolation method as 

Interpolation filter half length This property applies only when you set the
For example, for an input The longer the 

Interpolation points per input sample This property only applies when you set the If you specify interpolation points which do not correspond
to a polyphase subfilter, the object rounds the point down to the
nearest interpolation point associated with a polyphase subfilter.
For example, you set the 

Normalized input bandwidth This property applies only when you set the 
clone  Create interpolator object with same property values 
getNumInputs  Number of expected inputs to step method 
getNumOutputs  Number of outputs of step method 
isLocked  Locked status for input attributes and nontunable properties 
release  Allow property value and input characteristics changes 
step  Linear or FIR interpolation 
A polyphase implementation of an FIR interpolation filter splits the lowpass FIR filter impulse response into a number of different subfilters. Let L represent the number of interpolation points per sample, or the upsampling factor, and P the half length of the polyphase subfilters. Indexing from zero, if h(n) is the impulse response of the FIR filter, the kth subfilter is:
$$\begin{array}{l}{h}_{k}(n)=h(k+nL)\text{\hspace{1em}}k=0,1,\dots ,L1\text{\hspace{1em}}n=0,1,\dots ,2P1\\ \\ \end{array}$$
The following table describes the decomposition of an 18coefficient FIR filter into 3 polyphase subfilters of length 6, the defaults for the FIR interpolator object:
Coefficients  Polyphase Subfilter 

h(0),h(3),h(6), ..., h(15)  h_{0}(n) 
h(1),h(4),h(7), ..., h(16)  h_{1}(n) 
h(2),h(5),h(8), ..., h(17)  h_{2}(n) 
The following code shows how to find the polyphase subfilters for the default FIR interpolator object:
H = dsp.Interpolator('Method','FIR'); L = H.InterpolationPointsPerSample; P = H.FilterHalfLength; FiltCoeffs = intfilt(L,P,H.Bandwidth); % Returns filter of length 2*P*L1 FiltLen=length(FiltCoeffs); FiltCols = ceil(FiltLen/2/L); % We need 2*P*L coefficients % Prepending a zero does not affect the filter magnitude FiltCoeffs = [zeros(FiltCols*2*LFiltLen,1); FiltCoeffs(:)]; % Each column of PolyPhaseCoeffs is a polyphase subfilter PolyPhaseCoeffs = reshape(FiltCoeffs,FiltCols,2*L)';
This object implements the algorithm, inputs, and outputs described on the Interpolation block reference page. The object properties correspond to the Simulink^{®} block parameters, except:
Out of range interpolation points —
The interpolator object only has the Clip option.
The Simulink block has the additional Clip and warn and Error options. 