MATLAB: How to access the properties of a BODE Diagram from the command line using the Control System Toolbox 6.2 (R14SP2)

bodeControl System Toolboxfrequencyhertzhzpropertiespropertyrequestsisotoolunits

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.

Best Answer

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.