What is the difference between the plots of the following commands.

4 views (last 30 days)
[h,w]=freqz(kw,1,256) ; % frequency response of the window
mag=20*log10(abs(h));
plot(w/pi,mag,'k')
and
freqz(kw,1,256)

Answers (1)

Star Strider
Star Strider on 7 Apr 2021
The second one draws the complete Bode plot (magnitude spectrum and phase spectrum) and plots it as a function of the angular frequency .
The first one draws only the magnitude spectrum, and normalises the frequency axis to [0 1] by dividing by π.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!