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

« back to all changes in this revision

Viewing changes to demos/robust/mu.dem

  • 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
//test of musolve
 
2
// Copyright INRIA
 
3
mode(-1)
 
4
M1 = [ ..
 
5
   5.2829       5.7683      -2.4004       1.2205      -6.4148    
 
6
   9.7769e-01   2.9786      -3.0408       5.0257e-01  -2.6504    
 
7
   7.0819       9.6324      -3.5750       3.3016      -6.7030    
 
8
  -1.6261      -2.9763       1.6870      -1.0603       1.2211    
 
9
   2.3056       4.3712      -2.4785       2.6152      -1.9832    ];
 
10
 
 
11
M2 = [ ..
 
12
  -1.1308      -1.7785       8.7974e-01  -7.5206e-01   1.2089    
 
13
  -3.5255e-01  -5.7002e-01   2.9305e-01  -2.5442e-01   3.7691e-01
 
14
  -1.3724      -2.1501       1.0741      -9.1188e-01   1.4669   
 
15
   3.5839e-01   5.5101e-01  -2.7290e-01   2.3565e-01  -3.7663e-01
 
16
  -4.9015e-01  -7.8706e-01   4.0215e-01  -3.3617e-01   5.3261e-01];
 
17
//*******************************************************
 
18
M=M1 +%i*M2;
 
19
// Let the structure be all scalar blocks
 
20
K = [1 1 1 1 1]'; 
 
21
// Let the first, the third and the fifth blocks be real,
 
22
// and let the rest of blocks be complex
 
23
T = [1 2 1 2 1]';
 
24
[D,g,mu] = musolve(M,K,T);
 
25
spec(M'*D*M+%i*(G*M-M'*G')-mu^2*D)
 
26
 
 
27
 
 
28
// Now, we compute it again with respect to all complex blocks
 
29
T = [2 2 2 2 2]';
 
30
[D,g,mu] = musolve(M,K,T);
 
31
spec(M'*D*M+%i*(G*M-M'*G')-mu^2*D)
 
32
 
 
33
 
 
34
T = 3*[1 1 1 1 1]';
 
35
[D,g,mu] = musolve(M,K,T;
 
36
//
 
37
K = [2 3]';
 
38
T = [2 2]';
 
39
[D,g,mu] = musolve(M,K,T);
 
40
 
 
41