Implement linear statespace system
Simulink / Continuous
The StateSpace block implements a system whose behavior you define as
$$\begin{array}{l}\dot{x}=Ax+Bu\\ y=Cx+Du\\ {x}_{t={t}_{0}}={x}_{0},\end{array}$$
where x is the state vector, u is the input vector, y is the output vector, and x0 is the initial condition of the state vector. The A, B, C, and D matrices can be specified as either sparse matrices or dense matrices. The matrix coefficients must have these characteristics:
A must be an nbyn matrix, where n is the number of states.
B must be an nbym matrix, where m is the number of inputs.
C must be an rbyn matrix, where r is the number of outputs.
D must be an rbym matrix.
In general, the block has one input port and one output port. The number of rows in C or D matrix is the same as the width of the output port. The number of columns in the B or D matrix are the same as the width of the input port. If you want to model an autonomous linear system with no inputs, set the B and D matrices to empty. In this case, the block acts as a source block with no input port and one output port, and implements the following system:
$$\begin{array}{l}\dot{x}=Ax\\ y=Cx\\ {x}_{t={t}_{0}}={x}_{0}.\end{array}$$
Simulink^{®} software converts a matrix containing zeros to a sparse matrix for efficient multiplication.
Data Types 

Direct Feedthrough 

Multidimensional Signals 

VariableSize Signals 

ZeroCrossing Detection 
