MATLAB: How to plot this

plotting

How do I plot the magnitude of a transfer function H?

Best Answer

It depends on the Toolbox you’re using.
For a filter using the Signal Processing Toolbox, use the freqz (link) or freqs (link on the freqz page) functions.
For a control system using the Control System Toolbox, use the bode (link) function. Note that it is essentially impossible to change any of the plot characteristics using bode, so if you want to customise the plot, get the outputs from bode and plot them using the subplot function.