www.gusucode.com > control 案例程序 matlab源码代码 > control/ComputeAndPlotSingularValuesExample.m

    %% Compute and Plot Singular Values
% Consider the following two-input, two-output dynamic system. 
%%
% 
% $$H(s) = \left[ {\begin{array}{*{20}{c}}
% 0&{\displaystyle \frac{{3s}}{{{s^2} + s + 10}}}\\[3ex]
% {\displaystyle \frac{{s + 1}}{{s + 5}}}&{\displaystyle \frac{2}{{s + 6}}}
% \end{array}} \right].$$
%%
% Compute the singular value responses of _H_(_s_) and _I_ + _H_(_s_).

% Copyright 2015 The MathWorks, Inc.

H = [0, tf([3 0],[1 1 10]) ; tf([1 1],[1 5]), tf(2,[1 6])];
[svH,wH] = sigma(H);
[scIH,wIH] = sigma(H,[],2);
%% 
% In the last command, the input 2 selects the second response type, _I_ +
% _H_(_s_).  The vectors |svH| and |svIH| contain the singular value
% response data, at the frequencies in |wH| and |wIH|.
%
% Plot the singular value responses of both systems.
subplot(211)
sigma(H)
subplot(212)
sigma(H,[],2)