Bode Diagram Plot specification (magnitude)

11 Ansichten (letzte 30 Tage)
Francesco Porretta
Francesco Porretta am 4 Feb. 2021
Kommentiert: Star Strider am 4 Feb. 2021
Good Morning guys,
I was wondering if it is possible to plot the bode diagram of a transfer function neglecting some area in the magnitude.
I'm going to better explain myself: I want to show in the plot that the tranfer function in magnitude is higher than 40 decibel in the range frequency < 1 rad/s (so I want to, let's say, colour all the zone in the graph that is lower than 40 dB up to 1 rad/s).
In other words, I want to obtain something like in the following figure (the grey parts).
How can I do?
Thanks for your help!

Akzeptierte Antwort

Star Strider
Star Strider am 4 Feb. 2021
That would likely be next to impossible using the bode function itself. The best option is to get the outputs from bode as described in Obtain Magnitude and Phase Data and the use the regular plotting routines to do the plot.
It may be necessary to use the squeeze function on some of the bode outputs to create the necessary vectors for the plot.
Since you will be filling in the gray areas, use patch or fill to create them. In my experience, patch does not work well if you first define semilogx as the plot scaling, so create the plot using plot itself, then set 'XScale' to 'log' after creating the plot.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by