For (Sample1):

Recall, column vector x represents v1, v2 & is while u represents vi and is and y the outputs happen to be the same as x vector in our State-Space Representation,
x' = A x + B u
y = C x + D u
where:
A = [-1,0,-4000; 0,-2,2000; 0.5,-0.5,0]
B = [1,0; 0,2000; 0,0]
C = [1,0,0; 0,1,0; 0,0,1]
D = [0,0; 0,0; 0,0]
Then use tf to generate ALL six transfer function rational expressions by,
For v1 / vi use,
For v2 / vi use,
For i / vi use,
Finally, to see the transfer functions: v1 / is , v2 / is &
i / is simply invoke TF(n,2) for n=1,2,3 individually.
For (Sample 2):
For this sample, lets use m-script file,
MATLAB produces the result,
EDUğ
a =
x1 x2 x3
x1 0 1.00000 0
x2 -3.00000 0 2.00000
x3 1.00000 0 -1.00000
b =
u1
x1 0
x2 1.00000
x3 0
c =
x1 x2 x3
y1 1.00000 0 0
d =
u1
y1 0
Continuous-time system.
For the transfer function we execute,
Transfer function:
s + 1
--------------------------
s^3 + s^2 + 3 s + 1
EDUğ