# tf2ssc

Transforms transfer function parameters to state-space parameters.

## Syntax

[A, B, C, D] = tf2ssc(NUM, DEN)

## Inputs

NUM
The numerator polynomial coefficients, stored as a vector or as a cell array of row vectors. The array dimensions will be q x p, as defined below in the outputs.
Type: double
DEN
The denominator polynomial coefficients, stored as a vector or as a cell array of row vectors. The array dimensions will also be q x p, even if a denominator is repeated.
Type: double

## 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). The dimensions for non-SISO cases will have the same dimensions as NUM.

## Examples

An SIMO system with 2 outputs:
num = {};
den = {};
num{1,1} = [1 -3 -5];
num{1,2} = [2 4 6 8];
den{1,1} = [1 3 5 6];
den{1,2} = [1 2 -7 9];
[A, B, C, D] = tf2ssc(num, den)
A = [Matrix] 6 x 6
1.33226763e-15  -1.30012222e-16   9.41873795e-17  -3.02059796e-15   2.32774735e-16   5.40000000e-01
-1.00000000e+00  -3.95512980e-16   3.87481039e-16  -1.87060844e-15  -9.93373877e-16  -3.00000000e-02
0.00000000e+00  -1.00000000e+00  -4.02062828e-16   9.81267165e-16  -5.00158061e-16   4.00000000e-02
0.00000000e+00   0.00000000e+00  -1.00000000e+00  -2.44373089e-16   6.99611538e-16  -4.00000000e-02
0.00000000e+00   0.00000000e+00   0.00000000e+00  -1.00000000e+01  -3.42830932e-15   4.00000000e-01
0.00000000e+00   0.00000000e+00   0.00000000e+00   0.00000000e+00  -1.00000000e+01  -5.00000000e+00
B = [Matrix] 6 x 2
-0.45000000  -0.60000000
-0.08000000  -0.70000000
0.20000000   0.70000000
0.18000000  -0.50000000
-0.10000000   2.00000000
-1.00000000   0.00000000
C = [Matrix] 1 x 6
0  0  0  0  0  -1
D = [Matrix] 1 x 2
0  2