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

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

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

Decimation — decrease sampling rate

```
y =
decimate(x,r)
```

```
y =
decimate(x,r,n)
```

```
y =
decimate(x,r,'fir')
```

```
y =
decimate(x,r,n,'fir')
```

Decimation reduces the original
sampling rate of a sequence to a lower rate. It is the opposite of
interpolation. `decimate`

lowpass
filters the input to guard against aliasing and downsamples the result.

For better results when `r`

is greater than
13, divide `r`

into smaller factors and call `decimate`

several
times.

`decimate`

uses decimation algorithms 8.2 and
8.3 from [1].

`decimate`

creates a lowpass filter. The default is a Chebyshev Type I filter designed using`cheby1`

. This filter has normalized cutoff frequency`0.8/r`

and passband ripple 0.05 dB. Sometimes, the specified filter order produces passband distortion due to roundoff errors accumulated from the convolutions needed to create the transfer function. The filter order is automatically reduced when distortion causes the magnitude response at the cutoff frequency to differ from the ripple by more than 10^{–6}.When the

`'fir'`

option is chosen,`decimate`

uses`fir1`

to design a lowpass FIR filter with cutoff frequency`1/r`

.When using the FIR filter,

`decimate`

filters the input sequence in only one direction. This conserves memory and is useful for working with long sequences. In the IIR case,`decimate`

applies the filter in forward and reverse directions using`filtfilt`

to remove phase distortion. This in effect doubles the filter order. In both cases, the function minimizes transient effects at both ends of the signal by matching endpoint conditions.Finally,

`decimate`

resamples the data by selecting every`r`

th point from the interior of the filtered signal. The resampled sequence is such that`y(end)`

matches`x(end)`

when the IIR filter is used and`y(1)`

matches`x(1)`

in the FIR case.

[1] Digital Signal Processing Committee of
the IEEE Acoustics, Speech, and Signal Processing Society, eds. *Programs
for Digital Signal Processing*. New York: IEEE Press, 1979,
chap. 8.

Was this topic helpful?