I am not exactly sure what nonnegative zero-phase response means. If a filter is zero-phase (i.e. symmetric and non-causal), then what does nonnegative imply? And what are the conditions to satisfy it?

Context: This is an error I get in Matlab when trying to design min-phase filters: Error using firminphase>checknonnegative (line 79) The filter has to have a nonnegative zero-phase response.

Error in firminphase (line 38) checknonnegative(b);

Error in firgr>genfilter (line 323) hRet = firminphase(hRet, s.zero, 'angles');

  • 1
    $\begingroup$ please provide a source or reference. The term doesn't make much sense without context $\endgroup$
    – Hilmar
    Nov 30, 2020 at 22:07
  • $\begingroup$ Sorry for the confusion. This is actually an error I get in Matlab: $\endgroup$ Dec 1, 2020 at 14:41
  • $\begingroup$ dsprelated.com/freebooks/filters/… $\endgroup$ Jun 26, 2023 at 7:51

1 Answer 1


What they mean here is that the real-valued amplitude function of the linear phase FIR filter that you provide to the function must be non-negative, because it is interpreted as the desired squared magnitude of the minimum-phase filter. This amplitude function is referred to as zero-phase response, which is the frequency response of the filter when the coefficients are shifted such that they are centered around the origin, i.e., $b[n]=b[-n]$ is satisfied. Note that the filter length must be odd.

If $N$ is the (odd) filter length, the zero-phase response is given by


where $B(e^{j\omega})$ is the frequency response of the causal filter.

  • $\begingroup$ 1. Since firminphase MATLAB function must satisfy none-negative zero-phase. You mean the firminphase function can only return minphase portion of just linear phase system? if not explain more please. If yes, why? 2.Exactly what is meaning zero-phase response. I understood that shifting over origine. but that is effects positive or negativeness, doesn't it?! $\endgroup$ Jun 26, 2023 at 7:33
  • $\begingroup$ @mohammadsdtmnd: A zero-phase response is the response of a linear-phase filter with its impulse response shifted such that it is centered at the origin. But you can just use the filter coefficients of a linear phase filter as input to firminphase, as long as the corresponding (zero-phase) response is non-negative. See the example here, where they use a constrained design to avoid negative values of the zero-phase response. $\endgroup$
    – Matt L.
    Jun 26, 2023 at 8:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.