%% Custom Initial Condition Plot of MIMO System
% Consider the following two-input, two-output dynamic system.
% sys(s) = \left[ {\begin{array}{*{20}{c}}
% 0&{\displaystyle \frac{{3s}}{{{s^2} + s + 10}}}\\
% {\displaystyle \frac{{s + 1}}{{s + 5}}}&{\displaystyle \frac{2}{{s + 6}}}
% \end{array}} \right].
% Convert the sys to state-space form since initial condition plots are supported only for state-space models.

sys = ss([0, tf([3 0],[1 1 10]) ; tf([1 1],[1 5]), tf(2,[1 6])]);
size(sys)

% The resultant state-space model has four states. Hence, provide an initial condition vector with four elements.

x0 = [0.3,0.25,1,4];

% Use timeoptions to create a plot options set and turn the grid on. Provide an appropriate title before creating the initial conditions plot.

plotoptions = timeoptions;
plotoptions.Grid = 'on';
plotoptions.Title.String = 'Initial Condition Plot of MIMO System sys(s)';
h = initialplot(sys,x0,plotoptions);

% Copyright 2021 The MathWorks, Inc.