Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

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? (MATLAB).

`interp = dsp.Interpolator`

`interp = dsp.Interpolator(Name,Value)`

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.

**For versions earlier than R2016b, use the step
function to run the System object algorithm. The arguments to
step are the object you created, followed by
the arguments shown in this section.**

**For example, y = step(obj,x) and y = obj(x) perform equivalent operations.**

`interpOut = interp(input)`

`interpOut = interp(input,ipts)`

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`