1
function [enx,X,Y,eny]=entropy(S,gama)
2
//Computation of the entropy at gama of a linear system S
3
//[enx,X,Y,eny]=entropy(S,gama)
8
if S1(1)=='r' then S=tf2ss(S);end
11
H=[A,g1*B*B';-g1*C'*C,-A'];
12
[X,zero]=ric_desc(H); //zero=A'*X+X*A+g1*g1*X*B*B'*X+C'*C;
13
enx=sum(diag(X*B*B'));
14
J=[A',g1*C'*C;-g1*B*B',-A];
15
[Y,zero]=ric_desc(J); //zero=A*Y+Y*A'+g1*g1*Y*C'*C*Y+B*B'
16
eny=sum(diag(Y*C'*C));