right now I'm working on control.matlap.tf2ss
and I would like to access my array in my state space.
Here is my code
Gs = tf([P.l], [P.Jzz, 0, 0])
Cs = tf([P.Kp, P.Kd], 1)
Gcl = feedback(series(Cs, Gs), 1)
po = pole(Gcl)
num, den = tfdata(Gs)
sys = tf2ss(Gs)
print sys
Result:
A = [[ 0. 0.]
[ 1. 0.]]
B = [[-10.58350385]
[ 0. ]]
C = [[ 0. -1.]]
D = [[ 0.]]
How can I access array A, B, C, D?
For arrays of state-space models with variable numbers of states, use the syntax:
[a,b,c,d] = ssdata(sys,'cell')