# Designing high pass filters with remez from DSP

**URL:** <https://discourse.julialang.org/t/designing-high-pass-filters-with-remez-from-dsp/139064>\
**Category:** Signal and Image Processing\
**Created:** [August 27, 2026, 11:41am UTC](https://discourse.julialang.org/t/designing-high-pass-filters-with-remez-from-dsp/139064 "2026-08-27T11:41:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miroboru](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/miroboru/32/47659_2.png) [@Miroboru](https://discourse.julialang.org/u/Miroboru)\
**Post date:** [August 27, 2026, 11:41am UTC](https://discourse.julialang.org/t/designing-high-pass-filters-with-remez-from-dsp/139064/1 "2026-08-27T11:41:11Z")

</div>

When using the remez function from DSP to design high pass filters, the result is not what I expect. Here is an MWE (1.12.7 plus latest DSP):

```julia-auto
using DSP

h = remez(32, [(0.0, 0.2) => 0.0, (0.3, 0.5) => 1.0])
h_obj = PolynomialRatio(h,[1])
H, fax = freqresp(h_obj)
# Plotting here ..

```

This gives the following frequency response:

 ![hp](https://global.discourse-cdn.com/julialang/original/3X/f/6/f6da1faf00d090013f971469e19af052a6729799.png)

On the other hand, changing the filter to lowpass with the exact same conditions gives us a proper filter:

```julia-auto
using DSP

h = remez(32, [(0.0, 0.2) => 1.0, (0.3, 0.5) => 0.0])
h_obj = PolynomialRatio(h,[1])
H, fax = freqresp(h_obj)
# Plotting here 

```

 ![lp](https://global.discourse-cdn.com/julialang/original/3X/6/9/696d8e530c95f85c901a0b492a13da2a1148e1eb.png)

What am I missing here?

---

<div class="post-metadata">

**Author:** ![Miroboru](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/miroboru/32/47659_2.png) [@Miroboru](https://discourse.julialang.org/u/Miroboru)\
**Post date:** [August 27, 2026, 12:00pm UTC](https://discourse.julialang.org/t/designing-high-pass-filters-with-remez-from-dsp/139064/2 "2026-08-27T12:00:09Z")

</div>

So, it turns out that using an even filter order does not work for high pass filters, while odd ones do. Not sure if this is some theoretical limitation or a implementation mishap, but there it is. Should probably be mentioned somewhere anyways…

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [August 27, 2026, 12:01pm UTC](https://discourse.julialang.org/t/designing-high-pass-filters-with-remez-from-dsp/139064/3 "2026-08-27T12:01:16Z")

</div>

For highpass linear-phase FIR filters we need an odd number of taps because [an even number forces a zero gain at Nyquist](https://mattsdsp.blogspot.com/2014/11/linear-phase-fir-filters-4-types.html?m=1) (not a problem for low-pass filters).
