www.gusucode.com > control 案例程序 matlab源码代码 > control/ChangeBodePlotUnitsFromTheCommandLineExample.m
%% Change Bode Plot Units from the Command Line % This example shows how to change the units of a Bode plot from % rad/s to Hz. %% % Create a system and generate a Bode Plot of the system's response. The % plot uses the default units, rad/s. % Copyright 2015 The MathWorks, Inc. sys = tf(4,[1 0.5 4]); h = bodeplot(sys); %% % The |bodeplot| command returns a plot handle that you can use to change % properties of the plot. % % Change the units to Hz. p = getoptions(h); p.FreqUnits = 'Hz'; setoptions(h,p) %% % The x-axis label updates to reflect the change of unit. %% % For more examples of customizing plots from the command line, see % <docid:control_ug.f0-1032970>.