%% Singular Values of MIMO System
% For this example, create a 2-output, 3-input system.

rng(0,'twister'); % For reproducibility
H = rss(4,2,3);

% For this system, sigma plots the singular values of the frequency response matrix in the same plot.

sigma(H)

% Compute the singular values at 20 frequencies between 1 and 10 radians.

w = logspace(0,1,20);
sv = sigma(H,w);

% sv is a matrix, in which the rows correspond to the singular values of the frequency response matrix and the columns are the frequency values. Examine the dimensions.

size(sv)

% Thus, for example, sv(:,10) are the singular values of the response computed at the 10th frequency in w.
% Copyright 2021 The MathWorks, Inc.