upfirdn
Upsample, apply FIR filter, and downsample
Description
Examples
Input Arguments
Output Arguments
Tips
The valid combinations of the sizes of xin and h
are:
xinis a vector andhis a vector.The inputs are one filter and one signal, so the function convolves
xinwithh. The output signalyoutis a row vector ifxinis a row vector; otherwise,youtis a column vector.xinis a matrix andhis a vector.The inputs are one filter and many signals, so the function convolves
hwith each column ofxin. The resultingyoutis a matrix with the same number of columns asxin.xinis a vector andhis a matrix.The inputs are multiple filters and one signal, so the function convolves each column of
hwithxin. The resultingyoutis a matrix with the same number of columns ash.xinis a matrix andhis a matrix, both with the same number of columns.The inputs are multiple filters and multiple signals, so the function convolves corresponding columns of
xinandh. The resultingyoutis a matrix with the same number of columns asxinandh.
Algorithms
upfirdn uses a polyphase interpolation structure. The number of
multiply-add operations in the polyphase structure is approximately (LhLx
– pLx)/q where Lh and
Lx are the lengths of
h(n) and x(n),
respectively. For long signals, this formula is often exact.
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.
References
[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.

