I started studying DSP recently. In my MATLAB assignments, I am often asked to plot the frequency response of a digital filter using freqz
. I know there's another function for plotting a frequency response, bode
.
In my last assignment, I was asked to design a notch filter for $60\textrm{ Hz}$ with a sampling frequency of $200\textrm{ Hz}$. After doing so, I plotted the frequency response using freqz
, which gave me the expected result - the notch was on $60\textrm{ Hz}$:
However, when I plot the frequency response using bode
, the frequency is off significantly:
To my understanding, both functions measure the frequency response. Why is one giving me the correct result then, when the other is not?