How to plot magnitude (not in db) of the transfer function for the frequencies?

Risposte (1)

Hi,
You can use 'bode' function itself to get the absolute magnitude in MATLAB.
[mag,phase,wout] = bode(sys); % where 'sys' is the transfer function specified using 'tf'
mag is the absolute magnitude (not in dB) and wout is a set of frequencies. You can now plot mag against wout by either using the 'plot' function if you want a linear X axis or the 'semilogx' function if you want a logarithmic X axis.
Refer to the following documentation for more information:
Hope this helps!

Tag

Richiesto:

il 1 Mar 2020

Modificato:

il 29 Mar 2023

Community Treasure Hunt

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

Start Hunting!

Translated by