How can I access the properties of a BODE Diagram from the command line using the Control System Toolbox 6.2 (R14SP2)?

7 views (last 30 days)
I want to change the properties of my BODE diagram (specifically, I want to change the frequency units from rad/sec to Hz) from the MATLAB command prompt.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 14 Oct 2022
Edited: MathWorks Support Team on 23 Nov 2022
This feature has been added in the Control System Toolbox 6.2 (R14SP2).
It is possible to change the options for a particular plot using the GETOPTIONS and SETOPTIONS methods. You can also use the "options" structure when you first create the plot to start with those particular options. For more information on how to customize the Control System Toolbox plots from the command line, see the following website:
If you are using a previous version, read the following:
You can use the following code to access the properties of a BODE plot:
bode(rss(5))
h = gcr; % h =plot object root
get(h) % peek inside
For example, to change the frequency from rad/sec to Hertz, use the following code:
bode(rss(5))
h = gcr;
h.AxesGrid.XUnits = 'Hz'
NOTE: This workaround has not been tested by MathWorks. This code may change in future releases of MATLAB (unless it becomes documented in a future release), so there is no guarantee of backward compatibility.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!