Note: This page has been translated by MathWorks. Please click here

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

To view all translated materals including this page, select Japan 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)

Common to All System Objects

`step` | Run System object algorithm |

`clone` | Create duplicate System object |

`getNumInputs` | Number of inputs required to call the System object |

`getNumOutputs` | Number of outputs from calling the System object |

`isLocked` | Determine if System object is locked |

`release` | Release resources and allow changes to System object property values and input characteristics |

`reset` | Reset internal states of System object |

`dsp.CICCompensationInterpolator`

|`dsp.CICInterpolator`

|`dsp.FIRHalfbandInterpolator`

|`dsp.FIRInterpolator`

|`dsp.IIRHalfbandInterpolator`

|`dsp.VariableFractionalDelay`

Was this topic helpful?