What does nonnegative zero-phase response mean? 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&gt;checknonnegative (line 79)
The filter has to have a nonnegative zero-phase response.
Error in firminphase (line 38)
checknonnegative(b);
Error in firgr&gt;genfilter (line 323)
hRet = firminphase(hRet, s.zero, 'angles');
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
$$B_{zp}(e^{j\omega})=B(e^{j\omega})e^{j\omega(N-1)/2}$$
where $B(e^{j\omega})$ is the frequency response of the causal filter.