%% 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).

H = [0, tf([3 0],[1 1 10]) ; tf([1 1],[1 5]), tf(2,[1 6])];
[svH,wH] = sigma(H);
[svIH,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)

% Copyright 2015 The MathWorks, Inc.