upfirdn
Upsample, apply FIR filter, and downsample
Description
Examples
Input Arguments
Output Arguments
Tips
The valid combinations of the sizes of x and h
are:
xis a vector andhis a vector.The inputs are one filter and one signal, so the function convolves
xwithh. The output signalyis a row vector ifxis a row vector; otherwise,yis a column vector.xis a matrix andhis a vector.The inputs are one filter and many signals, so the function convolves
hwith each column ofx. The resultingyis a matrix with the same number of columns asx.xis a vector andhis a matrix.The inputs are multiple filters and one signal, so the function convolves each column of
hwithx. The resultingyis a matrix with the same number of columns ash.xis 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
xandh. The resultingyis a matrix with the same number of columns asxandh.
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.



