%% Array of Frequency-Response Data Models
% To create arrays of frd models, you can specify a multidimensional array of frequency response data.
% For instance, when you specify the response data as a numeric array of size [NY NU NF S1 ... Sn], the function returns a S1-by-...-by-Sn array of frd models. Each of these models has NY outputs, NU inputs, and NF frequency points.
% Generate a 2-by-3 array of random response data with one-output, two-input models at 10 frequency points between 0.1 and 10 rad/s.

w = logspace(-1,1,10);
r = randn(1,2,10,2,3)+1i*randn(1,2,10,2,3);
sys = frd(r,w);

% Extract the model at the index (2,1) from the model array.

sys21 = sys(:,:,2,1)

% Copyright 2021 The MathWorks, Inc.