ssdata
Extracts data from a state-space model.
Syntax
[A, B, C, D, Ts] = ssdata(sys)
Inputs
- LTI
 - Continuous-time state-space or transfer function model.
 
Outputs
- 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).
 
Examples
State space model as an input to the function:
        
A=[0 1;-2 -3];
B=[0;1];
C=[1 0];
D = 0;
sys = ss(A, B, C, D);
[rA, rB, rC, rD, rTs] = ssdata(sys)rA = [Matrix] 2 x 2
 0   1
-2  -3
rB = [Matrix] 2 x 1
0
1
rC = [Matrix] 1 x 2
1  0
rD = 0
rTs = 0Transfer function model as input to the function:
        
    num = [2 1];
den = [4 3 2];
G = tf(num,den);
[A2, B2, C2, D2] = ssdata(G)A2 = [Matrix] 2 x 2
-0.75000  -0.50000
 1.00000   0.00000
B2 = [Matrix] 2 x 1
1
0
C2 = [Matrix] 1 x 2
0.50000  0.25000
D2 = 0Comments
[A, B, C, D, Ts] = ssdata(sys) returns matrix A, B, C, D from the state-space or transfer function model LTI.