Bode Diagram Plot specification (magnitude)

9 ビュー (過去 30 日間)
Francesco Porretta
Francesco Porretta 2021 年 2 月 4 日
コメント済み: Star Strider 2021 年 2 月 4 日
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!

採用された回答

Star Strider
Star Strider 2021 年 2 月 4 日
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.
  2 件のコメント
Francesco Porretta
Francesco Porretta 2021 年 2 月 4 日
thanks!
Star Strider
Star Strider 2021 年 2 月 4 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by