%% Array of Zero-Pole-Gain Models
% You can use a for loop to specify an array of zero-pole-gain models.
% First, pre-allocate the zero-pole-gain model array with zeros.

sys = zpk(zeros(1,1,3));

% The first two indices represent the number of outputs and inputs for the models, while the third index is the number of models in the array.
% Create the zero-pole-gain model array using a rational expression in the for loop.

s = zpk('s');                                                  
for k = 1:3                                                             
    sys(:,:,k) = k/(s^2+s+k);                                          
end
sys

% Copyright 2020 The MathWorks, Inc.