Main Content

Linear or polyphase FIR interpolation

The `dsp.Interpolator`

System object™ interpolates values between real-valued input samples using linear or polyphase
FIR interpolation. Specify which values to interpolate by providing a vector of interpolation
points. An interpolation point of 1 refers to the first sample in the input. To interpolate
the value halfway between the second and third sample in the input, specify an interpolation
point of 2.5. Interpolation points that are not within the valid range are replaced with the
closest value in the valid range.

To interpolate a real-valued input signal:

Create the

`dsp.Interpolator`

object and set its properties.Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?.

creates an
interpolation System object, `interp`

= dsp.Interpolator`interp`

, to interpolate values between real-valued
input samples using linear interpolation.

creates
an interpolation System object, `interp`

= dsp.Interpolator(`Name,Value`

)`interp`

, with each specified property set to the
specified value. Enclose each property name in single quotes.

outputs the interpolated sequence, `interpOut`

= interp(`input`

)`interpOut`

, of the input vector or
matrix *input*, as specified in the InterpolationPoints property. Each column of
`input`

is treated as an independent channel of the input.

outputs the interpolated sequence as specified by `interpOut`

= interp(`input`

,`ipts`

)`ipts`

.

To specify the interpolation points, set the InterpolationPointsSource property to ```
'Input
port'
```

.

t = 0:.0001:.0511; x = sin(2*pi*20*t); x1 = x(1:50:end); ipts = 1:0.1:length(x1); interp = dsp.Interpolator('InterpolationPointsSource','Input port'); interpOut = interp(x1',ipts');

To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named `obj`

, use
this syntax:

release(obj)

`dsp.CICCompensationInterpolator`

|`dsp.CICInterpolator`

|`dsp.FIRHalfbandInterpolator`

|`dsp.FIRInterpolator`

|`dsp.IIRHalfbandInterpolator`

|`dsp.VariableFractionalDelay`