%% Continuous-Time MIMO State-Space Model
% For this example, consider a cube rotating about its corner with inertia tensor J and a damping force F of 0.2 magnitude. The input to the system is the driving torque while the angular velocities are the outputs. The state-space matrices for the cube are:
% A = -J^{-1}F,\;\;\;B = J^{-1},\;\;\;C = I,\;\;\; D = 0,\\where,\;J =  \left[ {\begin{array}{ccc}
%    8 & -3 & -3 \\
%    -3 & 8 & -3 \\
%    -3 & -3 & 8\\
%   \end{array} } \right]\;and\;F =  \left[ {\begin{array}{ccc}
%    0.2 & 0 & 0 \\
%    0 & 0.2 & 0 \\
%    0 & 0 & 0.2\\
%   \end{array} } \right]
% Specify the A, B, C and D matrices, and create the continuous-time state-space model.

J = [8 -3 -3; -3 8 -3; -3 -3 8];
F = 0.2*eye(3);
A = -J\F;
B = inv(J);
C = eye(3);
D = 0;
sys = ss(A,B,C,D)

% sys is MIMO since the system contains 3 inputs and 3 outputs observed from matrices C and D. For more information on MIMO state-space models, see MIMO State-Space Models.
% Copyright 2019 The MathWorks, Inc.