| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
Continuous

The State-Space block implements a system whose behavior you define as
![]()
where x is the state vector, u is the input vector, and y is the output vector. The matrix coefficients must have these characteristics:
A must be an n-by-n matrix, where n is the number of states.
B must be an n-by-m matrix, where m is the number of inputs.
C must be an r-by-n matrix, where r is the number of outputs.
D must be an r-by-m matrix.

The block accepts one input and generates one output. The input vector width depends on the number of columns in the B and D matrices. The output vector width depends on the number of rows in the C and D matrices.
Simulink software converts a matrix containing zeros to a sparse matrix for efficient multiplication.
A State-Space block accepts and outputs real signals of type double.

Specify the n-by-n matrix coefficient, where n is the number of states.
Default: 1
See Block-Specific Parameters for the command-line information.
Specify the n-by-m matrix coefficient, where n is the number of states and m is the number of inputs.
Default: 1
See Block-Specific Parameters for the command-line information.
Specify the r-by-n matrix coefficient, where r is the number of outputs and n is the number of states.
Default: 1
See Block-Specific Parameters for the command-line information.
Specify the r-by-m matrix coefficient, where r is the number of outputs and m is the number of inputs.
Default: 1
See Block-Specific Parameters for the command-line information.
Specify the initial state vector.
Default: 0
The initial conditions of this block cannot be inf or NaN.
See Block-Specific Parameters for the command-line information.
Specify the absolute tolerance for computing the block output.
Default: auto
You can enter auto or a numeric value.
If you enter auto, Simulink uses the absolute tolerance value in the Configuration Parameters dialog box (see Solver Pane) to compute the block output.
If you enter a numeric value, that value overrides the absolute tolerance in the Configuration Parameters dialog box.
See Block-Specific Parameters for the command-line information.
Assign a unique name to each state.
Default: ' '
If this field is blank, no name assignment occurs.
To assign a name to a single state, enter the name between quotes, for example, 'velocity'.
To assign names to multiple states, enter a comma-delimited list surrounded by braces, for example, {'a', 'b', 'c'}. Each name must be unique.
The state names apply only to the selected block.
The number of states must divide evenly among the number of state names.
You can specify fewer names than states, but you cannot specify more names than states.
For example, you can specify two names in a system with four states. The first name applies to the first two states and the second name to the last two states.
To assign state names with a variable in the MATLAB workspace, enter the variable without quotes. A variable can be a string, cell array, or structure.
See Block-Specific Parameters for the command-line information.
Direct Feedthrough | Only if D ≠ 0 |
Sample Time | Continuous |
Scalar Expansion | Yes, of the initial conditions |
States | Depends on the size of A |
Dimensionalized | Yes |
Zero-Crossing Detection | No |
![]() | Squeeze | Step | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |