%% Plot Gain and Phase Margins Versus Frequency
% Plot the disk-based gain and phase margins of a system with open loop response L and closed-loop response feedback(L,1).

L = tf(25,[1 10 10 10]);
diskmarginplot(L)

%
% The disk-based gain margin at each frequency is at least ±GM, where GM is the value shown in the plot in dB. Similarly, the disk-based phase margin is ±PM degrees. The disk-based margins returned by the diskmargin command are the smallest margins over frequency. (Right-click on the plot and select Characteristics > Minimum Disk Margin for a data tip containing information about these minimum margins.)
%
% Copyright 2019 The MathWorks, Inc.