Main Content

Sample rate converter

The `dsp.FIRRateConverter`

System object™ performs sampling rate conversion by a rational factor on a vector or matrix
input. The FIR rate convertor cascades an interpolator with a decimator. The interpolator
upsamples the input by the upsampling factor, *L*, followed by a lowpass FIR
filter. The FIR filter acts both as an anti-imaging filter and an anti-aliasing filter prior
to decimation. The decimator downsamples the output of upsampling and FIR filtering by the
downsampling factor *M*. You must use upsampling and downsampling factors
that are relatively prime, or coprime. The resulting discrete-time signal has a sampling rate
*L/M* times the original sampling rate.

To perform sampling rate conversion:

Create the

`dsp.FIRRateConverter`

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?.

returns a FIR
sample rate converter, `firrc`

= dsp.FIRRateConverter`firrc`

, that resamples an input signal at a rate
3/2 times the original sampling rate.

returns an FIR sample rate converter, `firrc`

= dsp.FIRRateConverter(L,M,NUM)`firrc`

, with the
`InterpolationFactor`

property set to `L`

, the
`DecimationFactor`

property set to `M`

, and the `Numerator`

property set to `NUM`

.

returns an FIR sample rate converter, with additional properties specified by one or more
`firrc`

= dsp.FIRRateConverter(___,`Name,Value`

)`Name,Value`

pair arguments.

```
firrc =
dsp.FIRRateConverter('FullPrecisionOverride','false')
```

enables the fixed-point
data types to be controlled through the individual fixed-point property
settings.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)

This object implements the algorithm, inputs, and outputs described on the FIR Rate Conversion block reference page. The object properties correspond to the block parameters.