2

Upgraded to full answer. The diff function implements the difference equation $$y[n] = x[n]-x[n-1]$$ The transfer function is simply $$H(z) = 1 - z^{-1}$$ or $$H(\omega) = 1 - e^{-j\omega}$$ where $\omega$ is the normalized frequency. We can write this as $$H(\omega) = e^{-j\omega /2} \left( e^{+j\omega/2} - e^{-j\omega/2}\right) = e^{-j\omega /2} \cdot 2 ...


Only top voted, non community-wiki answers of a minimum length are eligible