ss

Constructs a state-space model.

Syntax

SYS = ss(A, B, C, D)

SYS = ss(A, B, C, D, Ts)

SYS = ss(SYSIN)

SYS = ss(SYSIN, 'minimal')

SYS = ss(D)

Inputs

A
The state matrix (n x n), where n is the number of states.
B
The input matrix (n x p), where p is the number of inputs.
C
The output matrix (q x n), where q is the number of outputs.
D
The direct transmission matrix (q x p).
Ts
Sampling time (in seconds).
Ts = -2: Static gain model. Example: ss(3)
Ts = -1: Discrete-time model with unspecified sampling time.
Ts = 0: Continuous-time model (default).
Ts > 0: Discrete-time model.
Changing this property will not discretize or re-sample the model.
SYSIN
Continuous-time state-space or transfer function model.

Outputs

SYS
Continuous-time state-space model.

Examples

State matrices as input to the function:
A = [0 1; -2 -3];
B = [0;  1];
C = [1 0];
D = 0;
sys1 = ss(A, B, C, D)
sys1 = object [
Scaled: 0
TimeUnit: seconds
ts: 0
a: [Matrix] 2 x 2
 0   1
-2  -3
b: [Matrix] 2 x 1
0
1
c: [Matrix] 1 x 2
1  0
d: 0
e: [Matrix] 0 x 0
type: StateSpaceModel
]
Transfer function model as an input to the function ss:
sys_tf = tf([1],[1 9 2]);
sys = ss(sys_tf)
sys = object [
Scaled: 0
TimeUnit: seconds
ts: 0
a: [Matrix] 2 x 2
-9  -2
 1   0
b: [Matrix] 2 x 1
1
0
c: [Matrix] 1 x 2
0  1
d: 0
e: [Matrix] 0 x 0
type: StateSpaceModel
]

Comments

Constructs a state-space model with real or complex-valued matrices. SYS = ss(A, B, C, D) creates the continuous-time state-space model associated with matrices A,B,C,D.

SYS = ss(SYSIN, 'minimal') computes a state-space model realization without unobservable and uncontrollable states.