I have found that this is a simple, but bad lowpass filter:
$$y(n) = x(n) + x(n-1)$$
However, I can't understand why it is a lowpass filter. What is its cutoff frequency?
I have found that this is a simple, but bad lowpass filter:
$$y(n) = x(n) + x(n-1)$$
However, I can't understand why it is a lowpass filter. What is its cutoff frequency?
What you have here is the equivalent of a moving-average filter. Specifically, it is a filter of order 1, whose impuse response is
$$h(n)=\delta(n)+\delta(n-1)$$
Taking its $Z$-transform, we get
$$H(z)=1+z^{-1}=\frac{z+1}{z}$$
There is a pole at $z=0$ and a zero at $z=-1$. Plotting the magnitude of the frequency response $H(\omega)\triangleq H(e^{-\imath \omega})=2\vert \cos(\omega/2)\vert$, you get the following curve
As you can see, this clearly is a low-pass filter. You can easily calculate the cut-off frequency from here on.