~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to macros/robust/entropy.sci

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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)
 
4
//!
 
5
//
 
6
// Copyright INRIA
 
7
S1=S(1);
 
8
if S1(1)=='r' then S=tf2ss(S);end
 
9
[A,B,C,D]=S(2:5);
 
10
g1=1/gama;
 
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));
 
17
 
 
18
 
 
19