# Matlab Filter Designer "Filter Information" shows wrong order

I want to design a low pass filter using the Filter Designer tool of Matlab. The filter order should be 10. I chose the Blackman window method and specified the order of the filter. However, "Current Filter Information" (top left) shows that the filter order is 9 and not 10, which is unexpected. I looked at the filter coefficients. There are 11 coefficients, so the filter order should be 10 and not 9?

Does that maybe have something to do with the first and last coefficients being 0? I also tried to select a Rectangular Window. That worked as expected.

Is the information of Matlab correct?

Matlab is correct. A causal FIR filter with transfer function

$$H(z)=\sum_{n=0}^{N}h[n]z^{-n}\tag{1}$$

has filter order $$N$$ only if $$h[N]\neq 0$$. If $$h[N]=0$$, the transfer function $$(1)$$ can be written as

$$H(z)=\sum_{n=0}^{N-1}h[n]z^{-n}\tag{2}$$

which clearly has order $$N-1$$ (unless $$h[N-1]=0$$). Appending zeros to the end of an impulse response doesn't change the order.

• Thank you! But why doesn't Matlab output filter taps which actually fulfill the specified order requirement? For example, if I set the order to 11, it will generate taps with order 10. Is this a bug? Commented Jun 21, 2022 at 11:56
• @leonboe1: This has to do with the Blackman window, which always has zeros as its first and last values. Commented Jun 21, 2022 at 12:04
• I see. So if I want a filter of order 10, I need to set the order to 11? Commented Jun 21, 2022 at 12:26
• @leonboe1: In the case of a Blackman window that would be the case. It would be different for a Hamming window. Commented Jun 21, 2022 at 12:36