State-Space
R2026bModel continuous linear system as system of explicit state-space equations
Libraries:
Simulink /
Continuous
Description
The State-Space block models a linear system as a system of ordinary differential equations expressed in the explicit form:
where:
x is the state vector.
u is the input vector.
y is the output vector.
x0 is the initial condition of the system, which provides the initial value of the state vector.
A, B, C, and D are matrices that contain the coefficients of the terms in the system equations.
You can use the State-Space block to model both time invariant and time variant linear explicit systems.
To model time-invariant systems, specify the A, B, C, and D parameters as constant matrices.
To model time-variant systems, tune the A, B, C, and D parameters during simulation.
To model continuous linear implicit systems, use the Descriptor State-Space block.
Specify System Matrices
To model your system, specify the system matrices using the A, B, C, and D parameters. You can specify either sparse or full matrices. By default, MATLAB® creates full matrices. For more information, see Constructing Sparse Matrices.
The number of states, inputs, and outputs in the system determine the dimensions of the system matrices. For a system with n states, m inputs, and r outputs, the dimensions are:
A — n-by-n
B — n-by-m
C — r-by-n
D — r-by-m
The image shows how the dimensions of the system matrices relate to each other.

Examples
Extended Examples
Ports
Input
Output
Parameters
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"simulink/Continuous/State-Space"
Example: add_block("simulink/Continuous/State-Space","myModel/myBlock",MakeNameUnique="on")
For information about programmatic access to individual block parameters, see the Programmatic Use section of parameter descriptions on this page.
Extended Capabilities
Version History
Introduced before R2006a
See Also
Discrete State-Space | Transfer Fcn | Descriptor State-Space
