| Filter Design Toolbox Reference Guide | ![]() |
www.kxcad.net Home > CAE Software Index > MATLAB Index >
Convert FIR lowpass filter to Type I FIR highpass filter
g = firlp2hp(b)
g = firlp2hp(b,'narrow')
g = firlp2hp(b,'wide')
g = firlp2hp(b) transforms the lowpass FIR filter b into a Type I highpass FIR filter g with zero-phase response Hr(π-w). Filter b can be any FIR filter, including a nonlinear-phase filter.
The passband and stopband ripples of g will be equal to the passband and stopband ripples of b.
g = firlp2hp(b,'narrow') transforms the lowpass FIR filter b into a Type I narrow band highpass FIR filter g with zero-phase response Hr(π-w). b can be any FIR filter, including a nonlinear-phase filter.
g = firlp2hp(b,'wide') transforms the Type I lowpass FIR filter b with zero-phase response Hr(w) into a Type I wide band highpass FIR filter g with zero-phase response 1 - Hr(w). Note the restriction that b must be a Type I linear-phase filter.
For this case, the passband and stopband ripples of g will be equal to the stopband and passband ripples of b.
Overlay the original narrowband lowpass (the prototype filter) and the post-conversion narrowband highpass and wideband highpass filters to compare and assess the conversion. The following plot shows the results.
b = firgr(36,[0 .2 .25 1],[1 1 0 0],[1 3]); zerophase(b); hold on; h = firlp2hp(b); zerophase(h); g = firlp2hp(b,'wide'); zerophase(g); hold off

zerophase in Signal Processing Toolbox documentation
Saramaki, T, Finite Impulse Response Filter Design, Handbook for Digital Signal ProcessingMitra, S.K. and J.F. Kaiser Eds. Wiley-Interscience, N.Y., 1993, Chapter 4.
| firlp2lp | firlpnorm | ![]() |
© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments