%% Magnitude of Specific I/O Pairs in MIMO Frequency Response Model
% For this example, consider a 2x2 MIMO frequency response model sys that contains 100 test frequencies for each I/O pair.
% Load the frd object sys from the MAT-file frdModelMIMO.mat.

load('frdModelMIMO.mat','sys')
size(sys)

% Define a function to compute the magnitude of the frequency response of the second I/O pair in sys.

fun = @(h) abs(h(2,2));

% Use the frdfun command to apply the function fun to the specific I/O pair in sys.

fsys = frdfun(fun,sys);

% Copyright 2019 The MathWorks, Inc.