Main Content

Upsample, apply FIR filter, and downsample

The valid combinations of the sizes of `xin`

and `h`

are:

`xin`

is a vector and`h`

is a vector.The inputs are one filter and one signal, so the function convolves

`xin`

with`h`

. The output signal`yout`

is a row vector if`xin`

is a row vector; otherwise,`yout`

is a column vector.`xin`

is a matrix and`h`

is a vector.The inputs are one filter and many signals, so the function convolves

`h`

with each column of`xin`

. The resulting`yout`

is a matrix with the same number of columns as`xin`

.`xin`

is a vector and`h`

is a matrix.The inputs are multiple filters and one signal, so the function convolves each column of

`h`

with`xin`

. The resulting`yout`

is a matrix with the same number of columns as`h`

.`xin`

is a matrix and`h`

is a matrix, both with the same number of columns.The inputs are multiple filters and multiple signals, so the function convolves corresponding columns of

`xin`

and`h`

. The resulting`yout`

is a matrix with the same number of columns as`xin`

and`h`

.

`upfirdn`

uses a polyphase interpolation structure. The number of
multiply-add operations in the polyphase structure is approximately (*L _{h}*

`upfirdn`

performs a cascade of three operations:

The FIR filter is usually a lowpass filter, which you must design using another function
such as `firpm`

or `fir1`

.

[1] Crochiere, R. E. "A General
Program to Perform Sampling Rate Conversion of Data by Rational Ratios." *Programs
for Digital Signal Processing* (Digital Signal Processing Committee of the IEEE
Acoustics, Speech, and Signal Processing Society, eds.). New York: IEEE Press, 1979, Programs
8.2-1–8.2-7.

[2] Crochiere, R. E., and Lawrence R.
Rabiner. *Multirate Digital Signal Processing*. Englewood Cliffs, NJ:
Prentice-Hall, 1983.