User`s guide

Table Of Contents
10 Reliable Computations
10-12
Its eigenvectors and eigenvalues are given as follows.
[v,d] = eig(A)
v =
0.7071 –0.0000 –0.3162 0.6325
–0.7071 0.0000 –0.3162 0.6325
0.0000 0.7071 0.6325 0.3162
–0.0000 –0.7071 0.6325 0.3162
d =
1.0000 0 0 0
0 2.0000 0 0
0 0 5.0000 0
0 0 0 10.0000
The condition number (with respect to inversion) of the eigenvector matrix is
cond(v)
ans =
1.000
Now convert a state-space model with the above A matrix to transfer function
form, and back again to state-sp ace form.
b = [1 ; 1 ; 0 ; –1];
c = [0 0 2 1];
H = tf(ss(A,b,c,0)); % transfer function
[Ac,bc,cc] = ssdata(H) % convert back to state space
The new A matrix is
Ac =
18.0000 –6.0625 2.8125 –1.5625
16.0000 0 0 0
0 4.0000 0 0
0 0 1.0000 0
Note that Ac is not a standard companion matrix and has already been
balanced as part of the
ss conversion (see ssbal for details).