File: MB04AZ.html

package info (click to toggle)
slicot 5.9.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,528 kB
  • sloc: fortran: 148,076; makefile: 964; sh: 57
file content (588 lines) | stat: -rw-r--r-- 26,755 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
<HTML>
<HEAD><TITLE>MB04AZ - SLICOT Library Routine Documentation</TITLE>
</HEAD>
<BODY>

<H2><A Name="MB04AZ">MB04AZ</A></H2>
<H3>
Eigenvalues of a complex skew-Hamiltonian/Hamiltonian pencil in factored form
</H3>
<A HREF ="#Specification"><B>[Specification]</B></A>
<A HREF ="#Arguments"><B>[Arguments]</B></A>
<A HREF ="#Method"><B>[Method]</B></A>
<A HREF ="#References"><B>[References]</B></A>
<A HREF ="#Comments"><B>[Comments]</B></A>
<A HREF ="#Example"><B>[Example]</B></A>

<P>
<B><FONT SIZE="+1">Purpose</FONT></B>
<PRE>
  To compute the eigenvalues of a complex N-by-N skew-Hamiltonian/
  Hamiltonian pencil aS - bH, with

           H  T           (  B  F  )       (  Z11  Z12  )
    S = J Z  J  Z and H = (      H ), Z =: (            ).       (1)
                          (  G -B  )       (  Z21  Z22  )

  The structured Schur form of the embedded real skew-Hamiltonian/
                                                        H  T
  skew-Hamiltonian pencil, aB_S - bB_T, with B_S = J B_Z  J  B_Z,

          (  Re(Z11)  -Im(Z11)  |  Re(Z12)  -Im(Z12)  )
          (                     |                     )
          (  Im(Z11)   Re(Z11)  |  Im(Z12)   Re(Z12)  )
          (                     |                     )
    B_Z = (---------------------+---------------------) ,
          (                     |                     )
          (  Re(Z21)  -Im(Z21)  |  Re(Z22)  -Im(Z22)  )
          (                     |                     )
          (  Im(Z21)   Re(Z21)  |  Im(Z22)   Re(Z22)  )
                                                                 (2)
          ( -Im(B)  -Re(B)  | -Im(F)  -Re(F)  )
          (                 |                 )
          (  Re(B)  -Im(B)  |  Re(F)  -Im(F)  )
          (                 |                 )
    B_T = (-----------------+-----------------) ,  T = i*H,
          (                 |      T       T  )
          ( -Im(G)  -Re(G)  | -Im(B )  Re(B ) )
          (                 |      T       T  )
          (  Re(G)  -Im(G)  | -Re(B ) -Im(B ) )

  is determined and used to compute the eigenvalues. Optionally,
  if JOB = 'T', the pencil aB_S - bB_H is transformed by a unitary
  matrix Q and a unitary symplectic matrix U to the structured Schur
                                                H  T
  form aB_Sout - bB_Hout, with B_Sout = J B_Zout  J  B_Zout,

             ( BA  BD  )              ( BB  BF  )
    B_Zout = (         ) and B_Hout = (       H ),               (3)
             (  0  BC  )              (  0 -BB  )

  where BA and BB are upper triangular, BC is lower triangular,
  and BF is Hermitian. B_H above is defined as B_H = -i*B_T.
  The embedding doubles the multiplicities of the eigenvalues of
  the pencil aS - bH.
  Optionally, if COMPQ = 'C', the unitary matrix Q is computed.
  Optionally, if COMPU = 'C', the unitary symplectic matrix U is
  computed.

</PRE>
<A name="Specification"><B><FONT SIZE="+1">Specification</FONT></B></A>
<PRE>
      SUBROUTINE MB04AZ( JOB, COMPQ, COMPU, N, Z, LDZ, B, LDB, FG,
     $                   LDFG, D, LDD, C, LDC, Q, LDQ, U, LDU, ALPHAR,
     $                   ALPHAI, BETA, IWORK, LIWORK, DWORK, LDWORK,
     $                   ZWORK, LZWORK, BWORK, INFO )C     .. Scalar Arguments ..
      CHARACTER          COMPQ, COMPU, JOB
      INTEGER            INFO, LDB, LDC, LDD, LDFG, LDQ, LDU, LDWORK,
     $                   LDZ, LIWORK, LZWORK, N
C     .. Array Arguments ..
      LOGICAL            BWORK( * )
      INTEGER            IWORK( * )
      DOUBLE PRECISION   ALPHAI( * ), ALPHAR( * ), BETA( * ), DWORK( * )
      COMPLEX*16         B( LDB, * ), C( LDC, * ), D( LDD, * ),
     $                   FG( LDFG, * ), Q( LDQ, * ), U( LDU, * ),
     $                   Z( LDZ, * ), ZWORK( * )

</PRE>
<A name="Arguments"><B><FONT SIZE="+1">Arguments</FONT></B></A>
<P>

<B>Mode Parameters</B>
<PRE>
  JOB     CHARACTER*1
          Specifies the computation to be performed, as follows:
          = 'E': compute the eigenvalues only; S and H will not
                 necessarily be transformed as in (3).
          = 'T': put S and H into the forms in (3) and return the
                 eigenvalues in ALPHAR, ALPHAI and BETA.

  COMPQ   CHARACTER*1
          Specifies whether to compute the unitary transformation
          matrix Q, as follows:
          = 'N': do not compute the unitary matrix Q;
          = 'C': the array Q is initialized internally to the unit
                 matrix, and the unitary matrix Q is returned.

  COMPU   CHARACTER*1
          Specifies whether to compute the unitary symplectic
          transformation matrix U, as follows:
          = 'N': do not compute the unitary symplectic matrix U;
          = 'C': the array U is initialized internally to the unit
                 matrix, and the unitary symplectic matrix U is
                 returned.

</PRE>
<B>Input/Output Parameters</B>
<PRE>
  N       (input) INTEGER
          Order of the pencil aS - bH.  N &gt;= 0, even.

  Z       (input/output) COMPLEX*16 array, dimension (LDZ, N)
          On entry, the leading N-by-N part of this array must
          contain the non-trivial factor Z in the factorization
                 H  T
          S = J Z  J  Z of the skew-Hamiltonian matrix S.
          On exit, if JOB = 'T', the leading N-by-N part of this
          array contains the upper triangular matrix BA in (3)
          (see also METHOD). The strictly lower triangular part is
          not zeroed. The submatrix in the rows N/2+1 to N and the
          first N/2 columns is unchanged, except possibly for the
          entry (N/2+1,N/2), which might be set to zero.
          If JOB = 'E', this array is unchanged on exit.

  LDZ     INTEGER
          The leading dimension of the array Z.  LDZ &gt;= MAX(1, N).

  B       (input/output) COMPLEX*16 array, dimension (LDB, K), where
          K = N, if JOB = 'T', and K = M, if JOB = 'E'.
          On entry, the leading N/2-by-N/2 part of this array must
          contain the matrix B.
          On exit, if JOB = 'T', the leading N-by-N part of this
          array contains the upper triangular matrix BB in (3)
          (see also METHOD).
          The strictly lower triangular part is not zeroed.
          If JOB = 'E', this array is unchanged on exit.

  LDB     INTEGER
          The leading dimension of the array B.
          LDB &gt;= MAX(1, M), if JOB = 'E';
          LDB &gt;= MAX(1, N), if JOB = 'T'.

  FG      (input/output) COMPLEX*16 array, dimension (LDFG, P),
          where P = MAX(M+1,N), if JOB = 'T', and
                P = M+1,        if JOB = 'E'.
          On entry, the leading N/2-by-N/2 lower triangular part of
          this array must contain the lower triangular part of the
          Hermitian matrix G, and the N/2-by-N/2 upper triangular
          part of the submatrix in the columns 2 to N/2+1 of this
          array must contain the upper triangular part of the
          Hermitian matrix F. Accidental nonzero imaginary parts on
          the main diagonals of F and G do not perturb the results.
          On exit, if JOB = 'T', the leading N-by-N part of this
          array contains the Hermitian matrix BF in (3) (see also
          METHOD). The strictly lower triangular part of the input
          matrix is preserved. The diagonal elements might have tiny
          imaginary parts, since they have not been annihilated.
          If JOB = 'E', this array is unchanged on exit.

  LDFG    INTEGER
          The leading dimension of the array FG.
          LDFG &gt;= MAX(1, M), if JOB = 'E';
          LDFG &gt;= MAX(1, N), if JOB = 'T'.

  D       (output) COMPLEX*16 array, dimension (LDD, N)
          If JOB = 'T', the leading N-by-N part of this array
          contains the matrix BD in (3) (see also METHOD).
          If JOB = 'E', this array is not referenced.

  LDD     INTEGER
          The leading dimension of the array D.
          LDD &gt;= 1,         if JOB = 'E';
          LDD &gt;= MAX(1, N), if JOB = 'T'.

  C       (output) COMPLEX*16 array, dimension (LDC, N)
          If JOB = 'T', the leading N-by-N part of this array
          contains the lower triangular matrix BC in (3) (see also
          METHOD). The part over the first superdiagonal is not set.
          If JOB = 'E', this array is not referenced.

  LDC     INTEGER
          The leading dimension of the array C.
          LDC &gt;= 1,         if JOB = 'E';
          LDC &gt;= MAX(1, N), if JOB = 'T'.

  Q       (output) COMPLEX*16 array, dimension (LDQ, 2*N)
          On exit, if COMPQ = 'C' and JOB = 'T', then the leading
          2*N-by-2*N part of this array contains the unitary
          transformation matrix Q.
          If COMPQ = 'C' and JOB = 'E', this array contains the
          orthogonal transformation which reduced B_Z and B_T
          in the first step of the algorithm (see METHOD).
          If COMPQ = 'N', this array is not referenced.

  LDQ     INTEGER
          The leading dimension of the array Q.
          LDQ &gt;= 1,           if COMPQ = 'N';
          LDQ &gt;= MAX(1, 2*N), if COMPQ = 'C'.

  U       (output) COMPLEX*16 array, dimension (LDU, 2*N)
          On exit, if COMPU = 'C' and JOB = 'T', then the leading
          N-by-2*N part of this array contains the leading N-by-2*N
          part of the unitary symplectic transformation matrix U.
          If COMPU = 'C' and JOB = 'E', this array contains the
          first N rows of the transformation U which reduced B_Z
          and B_T in the first step of the algorithm (see METHOD).
          If COMPU = 'N', this array is not referenced.

  LDU     INTEGER
          The leading dimension of the array U.
          LDU &gt;= 1,         if COMPU = 'N';
          LDU &gt;= MAX(1, N), if COMPU = 'C'.

  ALPHAR  (output) DOUBLE PRECISION array, dimension (N)
          The real parts of each scalar alpha defining an eigenvalue
          of the pencil aS - bH.

  ALPHAI  (output) DOUBLE PRECISION array, dimension (N)
          The imaginary parts of each scalar alpha defining an
          eigenvalue of the pencil aS - bH.
          If ALPHAI(j) is zero, then the j-th eigenvalue is real.

  BETA    (output) DOUBLE PRECISION array, dimension (N)
          The scalars beta that define the eigenvalues of the pencil
          aS - bH.
          Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and
          beta = BETA(j) represent the j-th eigenvalue of the pencil
          aS - bH, in the form lambda = alpha/beta. Since lambda may
          overflow, the ratios should not, in general, be computed.

</PRE>
<B>Workspace</B>
<PRE>
  IWORK   INTEGER array, dimension (LIWORK)
          On exit, if INFO = 3, IWORK(1) contains the number of
          (pairs of) possibly inaccurate eigenvalues, q &lt;= N/2, and
          IWORK(2), ..., IWORK(q+1) indicate their indices.
          Specifically, a positive value is an index of a real or
          purely imaginary eigenvalue, corresponding to a 1-by-1
          block, while the absolute value of a negative entry in
          IWORK is an index to the first eigenvalue in a pair of
          consecutively stored eigenvalues, corresponding to a
          2-by-2 block. A 2-by-2 block may have two complex, two
          real, two purely imaginary, or one real and one purely
          imaginary eigenvalue. The blocks are those in B_T and B_S.
          For i = q+2, ..., 2*q+1, IWORK(i) contains a pointer to
          the starting location in DWORK of the i-th triplet of
          1-by-1 blocks, if IWORK(i-q) &gt; 0, or 2-by-2 blocks,
          if IWORK(i-q) &lt; 0, defining unreliable eigenvalues.
          IWORK(2*q+2) contains the number of the 1-by-1 blocks, and
          IWORK(2*q+3) contains the number of the 2-by-2 blocks,
          corresponding to unreliable eigenvalues. IWORK(2*q+4)
          contains the total number t of the 2-by-2 blocks.
          If INFO = 0, then q = 0, therefore IWORK(1) = 0.

  LIWORK  INTEGER
          The dimension of the array IWORK.  LIWORK &gt;= 2*N+9.

  DWORK   DOUBLE PRECISION array, dimension (LDWORK)
          On exit, if INFO = 0 or INFO = 3, DWORK(1) returns the
          optimal LDWORK, and DWORK(2), ..., DWORK(4) contain the
          Frobenius norms of the factors of the formal matrix
          product used by the algorithm. In addition, DWORK(5), ...,
          DWORK(4+3*s) contain the s triplet values corresponding
          to the 1-by-1 blocks. Their eigenvalues are real or purely
          imaginary. Such an eigenvalue is obtained as -a1/a2/a3*i,
          where a1, ..., a3 are the corresponding triplet values,
          and i is the purely imaginary unit.
          Moreover, DWORK(5+3*s), ..., DWORK(4+3*s+12*t) contain the
          t groups of triplet 2-by-2 matrices corresponding to the
          2-by-2 blocks. Their eigenvalue pairs are either complex,
          or placed on the real and imaginary axes. Such an
          eigenvalue pair is given by imag( ev ) - real( ev )*i,
          where ev is the spectrum of the matrix product
          A1*inv(A2)*inv(A3), and A1, ..., A3 define the
          corresponding 2-by-2 matrix triplet.
          On exit, if INFO = -25, DWORK(1) returns the minimum
          value of LDWORK.

  LDWORK  INTEGER
          The dimension of the array DWORK.
          LDWORK &gt;= c*N**2 + N + MAX(6*N, 27), where
                    c = 18, if                 COMPU = 'C';
                    c = 16, if COMPQ = 'C' and COMPU = 'N';
                    c = 13, if COMPQ = 'N' and COMPU = 'N'.
          For good performance LDWORK should be generally larger.

          If LDWORK = -1, then a workspace query is assumed;
          the routine only calculates the optimal size of the
          DWORK array, returns this value as the first entry of
          the DWORK array, and no error message related to LDWORK
          is issued by XERBLA.

  ZWORK   COMPLEX*16 array, dimension (LZWORK)
          On exit, if INFO = 0, ZWORK(1) returns the optimal LZWORK.
          On exit, if INFO = -27, ZWORK(1) returns the minimum
          value of LZWORK.

  LZWORK  INTEGER
          The dimension of the array ZWORK.
          LZWORK &gt;= 8*N + 28, if JOB = 'T' and COMPQ = 'C';
          LZWORK &gt;= 6*N + 28, if JOB = 'T' and COMPQ = 'N';
          LZWORK &gt;= 1,        if JOB = 'E'.
          For good performance LZWORK should be generally larger.

          If LZWORK = -1, then a workspace query is assumed;
          the routine only calculates the optimal size of the
          ZWORK array, returns this value as the first entry of
          the ZWORK array, and no error message related to LZWORK
          is issued by XERBLA.

  BWORK   LOGICAL array, dimension (LBWORK)
          LBWORK &gt;= 0, if JOB = 'E';
          LBWORK &gt;= N, if JOB = 'T'.

</PRE>
<B>Error Indicator</B>
<PRE>
  INFO    INTEGER
          = 0: succesful exit;
          &lt; 0: if INFO = -i, the i-th argument had an illegal value;
          = 1: the algorithm was not able to reveal information
               about the eigenvalues from the 2-by-2 blocks in the
               SLICOT Library routine MB03BD (called by MB04ED);
          = 2: periodic QZ iteration failed in the SLICOT Library
               routines MB03BD or MB03BZ when trying to
               triangularize the 2-by-2 blocks;
          = 3: some eigenvalues might be inaccurate. This is a
               warning.

</PRE>
<A name="Method"><B><FONT SIZE="+1">Method</FONT></B></A>
<PRE>
  First T = i*H is set. Then, the embeddings, B_Z and B_T, of the
  matrices S and T, are determined and, subsequently, the SLICOT
  Library routine MB04ED is applied to compute the structured Schur
  form, i.e., the factorizations

  ~      T         (  BZ11  BZ12  )
  B_Z = U  B_Z Q = (              ) and
                   (    0   BZ22  )

  ~        T  T         (  T11  T12  )
  B_T = J Q  J  B_T Q = (          T ),
                        (   0   T11  )

  where Q is real orthogonal, U is real orthogonal symplectic, BZ11,
  BZ22' are upper triangular and T11 is upper quasi-triangular.
  If JOB = 'T', the 2-by-2 blocks are triangularized using the
  periodic QZ algorithm.

</PRE>
<A name="References"><B><FONT SIZE="+1">References</FONT></B></A>
<PRE>
  [1] Benner, P., Byers, R., Mehrmann, V. and Xu, H.
      Numerical Computation of Deflating Subspaces of Embedded
      Hamiltonian Pencils.
      Tech. Rep. SFB393/99-15, Technical University Chemnitz,
      Germany, June 1999.

</PRE>
<A name="Numerical Aspects"><B><FONT SIZE="+1">Numerical Aspects</FONT></B></A>
<PRE>                                                            3
  The algorithm is numerically backward stable and needs O(N )
  complex floating point operations.

</PRE>
<A name="Comments"><B><FONT SIZE="+1">Further Comments</FONT></B></A>
<PRE>
  This routine does not perform any scaling of the matrices. Scaling
  might sometimes be useful, and it should be done externally.

</PRE>

<A name="Example"><B><FONT SIZE="+1">Example</FONT></B></A>
<P>
<B>Program Text</B>
<PRE>
*     MB04AZ EXAMPLE PROGRAM TEXT
*
*     .. Parameters ..
      INTEGER            NIN, NOUT
      PARAMETER          ( NIN = 5, NOUT = 6 )
      INTEGER            NMAX
      PARAMETER          ( NMAX = 50 )
      INTEGER            LDB, LDC, LDD, LDFG, LDQ, LDU, LDWORK, LDZ,
     $                   LIWORK, LZWORK
      PARAMETER          ( LDB = NMAX,  LDC =   NMAX, LDD = NMAX,
     $                     LDFG = NMAX, LDQ = 2*NMAX, LDU = NMAX,
     $                     LDWORK = 18*NMAX*NMAX + NMAX + MAX( 2*NMAX,
     $                                                         24 ) + 3,
     $                     LDZ = NMAX, LIWORK = 2*NMAX + 9,
     $                     LZWORK = 8*NMAX + 28 )
*
*     .. Local Scalars ..
      CHARACTER          COMPQ, COMPU, JOB
      INTEGER            I, INFO, J, M, N
*
*     .. Local Arrays ..
      COMPLEX*16         B( LDB,   NMAX ),  C( LDC,   NMAX ),
     $                   D( LDD,   NMAX ), FG( LDFG,  NMAX ),
     $                   Q( LDQ, 2*NMAX ),  U( LDU, 2*NMAX ),
     $                   Z( LDZ,   NMAX ), ZWORK( LZWORK )
      DOUBLE PRECISION   ALPHAI( NMAX ), ALPHAR( NMAX ),
     $                   BETA(   NMAX ), DWORK(LDWORK )
      INTEGER            IWORK( LIWORK )
      LOGICAL            BWORK( NMAX )
*
*     .. External Functions ..
      LOGICAL            LSAME
      EXTERNAL           LSAME
*
*     .. External Subroutines ..
      EXTERNAL           MB04AZ
*
*     .. Intrinsic Functions ..
      INTRINSIC          MAX, MOD
*
*     .. Executable Statements ..
*
      WRITE( NOUT, FMT = 99999 )
*     Skip the heading in the data file and read in the data.
      READ( NIN, FMT = * )
      READ( NIN, FMT = * ) JOB, COMPQ, COMPU, N
      IF( N.LT.0 .OR. N.GT.NMAX .OR. MOD( N, 2 ).NE.0 ) THEN
         WRITE( NOUT, FMT = 99998 ) N
      ELSE
         READ( NIN, FMT = * ) ( (  Z( I, J ), J = 1, N ),     I=1, N )
         READ( NIN, FMT = * ) ( (  B( I, J ), J = 1, N/2 ),   I=1, N/2 )
         READ( NIN, FMT = * ) ( ( FG( I, J ), J = 1, N/2+1 ), I=1, N/2 )
*        Compute the eigenvalues of a complex skew-Hamiltonian/
*        Hamiltonian pencil (factored version).
         CALL MB04AZ( JOB, COMPQ, COMPU, N, Z, LDZ, B, LDB, FG, LDFG,
     $                D, LDD, C, LDC, Q, LDQ, U, LDU, ALPHAR, ALPHAI,
     $                BETA, IWORK, LIWORK, DWORK, LDWORK, ZWORK, LZWORK,
     $                BWORK, INFO )
*
         IF( INFO.NE.0 ) THEN
            WRITE( NOUT, FMT = 99997 ) INFO
         ELSE
            M = N/2
            IF( LSAME( JOB, 'T' ) ) THEN
               WRITE( NOUT, FMT = 99996 )
               DO 10 I = 1, N
                  WRITE( NOUT, FMT = 99995 ) (  Z( I, J ), J = 1, N )
   10          CONTINUE
               WRITE( NOUT, FMT = 99994 )
               DO 20 I = 1, N
                  WRITE( NOUT, FMT = 99995 ) (  B( I, J ), J = 1, N )
   20          CONTINUE
               WRITE( NOUT, FMT = 99993 )
               DO 30 I = 1, N
                  WRITE( NOUT, FMT = 99995 ) ( FG( I, J ), J = 1, N )
   30          CONTINUE
               WRITE( NOUT, FMT = 99992 )
               DO 40 I = 1, N
                  WRITE( NOUT, FMT = 99995 ) (  D( I, J ), J = 1, N )
   40          CONTINUE
               WRITE( NOUT, FMT = 99991 )
               DO 50 I = 1, N
                  WRITE( NOUT, FMT = 99995 ) (  C( I, J ), J = 1, N )
   50          CONTINUE
            END IF
            IF( LSAME( COMPQ, 'C' ) ) THEN
               WRITE( NOUT, FMT = 99990 )
               DO 60 I = 1, 2*N
                  WRITE( NOUT, FMT = 99995 ) ( Q( I, J ), J = 1, 2*N )
   60          CONTINUE
            END IF
            IF( LSAME( COMPU, 'C' ) ) THEN
               WRITE( NOUT, FMT = 99989 )
               DO 70 I = 1, N
                  WRITE( NOUT, FMT = 99995 ) ( U( I, J ), J = 1, 2*N )
   70          CONTINUE
            END IF
            WRITE( NOUT, FMT = 99988 )
            WRITE( NOUT, FMT = 99987 ) ( ALPHAR( I ), I = 1, N )
            WRITE( NOUT, FMT = 99986 )
            WRITE( NOUT, FMT = 99987 ) ( ALPHAI( I ), I = 1, N )
            WRITE( NOUT, FMT = 99985 )
            WRITE( NOUT, FMT = 99987 ) (   BETA( I ), I = 1, N )
         END IF
      END IF
      STOP
* 
99999 FORMAT ( 'MB04AZ EXAMPLE PROGRAM RESULTS', 1X )
99998 FORMAT ( 'N is out of range.', /, 'N = ', I5 )
99997 FORMAT ( 'INFO on exit from MB04AZ = ', I2 )
99996 FORMAT (/' The transformed matrix Z is' )
99995 FORMAT (20(1X,F9.4,SP,F9.4,S,'i '))
99994 FORMAT (/' The transformed matrix B is' )
99993 FORMAT (/' The transformed matrix FG is' )
99992 FORMAT (/' The matrix D is' )
99991 FORMAT (/' The matrix C is' )
99990 FORMAT (/' The matrix Q is' )
99989 FORMAT (/' The upper part of the matrix U is' )
99988 FORMAT (/' The vector ALPHAR is ' )
99987 FORMAT ( 50( 1X, F8.4 ) )
99986 FORMAT (/' The vector ALPHAI is ' )
99985 FORMAT (/' The vector BETA is ' )
      END
</PRE>
<B>Program Data</B>
<PRE>
MB04AZ EXAMPLE PROGRAM DATA
	T	C	C	4
   (0.4941,0.8054)   (0.8909,0.8865)   (0.0305,0.9786)   (0.9047,0.0596)
   (0.7790,0.5767)   (0.3341,0.0286)   (0.7440,0.7126)   (0.6098,0.6819)
   (0.7150,0.1829)   (0.6987,0.4899)   (0.5000,0.5004)   (0.6176,0.0424)
   (0.9037,0.2399)   (0.1978,0.1679)   (0.4799,0.4710)   (0.8594,0.0714)
   (0.5216,0.7224)   (0.8181,0.6596)
   (0.0967,0.1498)   (0.8175,0.5185)
    0.9729            0.8003           (0.4323,0.8313)
   (0.6489,0.1331)    0.4537            0.8253          
</PRE>
<B>Program Results</B>
<PRE>
MB04AZ EXAMPLE PROGRAM RESULTS

 The transformed matrix Z is
    0.4545  +0.0000i     0.7904  +0.0000i    -0.1601  +0.0000i    -0.2691  +0.0000i 
    0.7790  +0.5767i     0.4273  +0.0000i     0.1459  +0.0000i     0.1298  +0.0000i 
    0.7150  +0.1829i     0.6987  +0.4899i     0.6715  +0.0000i    -0.3001  +0.0000i 
    0.9037  +0.2399i     0.1978  +0.1679i     0.4799  +0.4710i     0.7924  +0.0000i 

 The transformed matrix B is
    0.0000  -1.7219i     0.0000  +0.7762i     0.0000  +0.5342i     0.0000  +0.0845i 
    0.0000  +0.0000i     0.0000  +0.8862i     0.0000  +0.5186i     0.0000  -0.1429i 
    0.0000  +0.0000i     0.0000  +0.0000i     0.0000  +1.1122i     0.0000  +0.2898i 
    0.0000  +0.0000i     0.0000  +0.0000i     0.0000  +0.0000i     0.0000  +0.4889i 

 The transformed matrix FG is
    0.0000  +0.0000i     0.0000  +0.4145i     0.0000  -0.7921i     0.0000  +0.5630i 
    0.6489  +0.1331i     0.0000  +0.0000i     0.0000  +1.5982i     0.0000  +0.5818i 
    0.0000  +0.0000i     0.0000  +0.0000i     0.0000  +0.0000i     0.0000  +0.5819i 
    0.0000  +0.0000i     0.0000  +0.0000i     0.0000  +0.0000i     0.0000  +0.0000i 

 The matrix D is
    2.2139  +0.0000i     0.0402  +0.0000i    -0.2787  +0.0000i     1.0465  +0.0000i 
   -0.5021  +0.0000i     0.5502  +0.0000i    -0.2771  +0.0000i    -0.4521  +0.0000i 
   -0.0398  +0.0000i     0.4046  +0.0000i     0.0149  +0.0000i     0.7577  +0.0000i 
   -0.1550  +0.0000i     2.0660  +0.0000i     1.6075  +0.0000i     0.5836  +0.0000i 

 The matrix C is
    0.3159  +0.0000i     0.0000  +0.0000i     0.0000  +0.0000i     0.0000  +0.0000i 
    0.7819  +0.0000i    -0.7575  +0.0000i     0.0000  +0.0000i     0.0000  +0.0000i 
   -0.3494  +0.0000i     0.8622  +0.0000i     0.7539  +0.0000i     0.0000  +0.0000i 
    1.1178  +0.0000i     0.3133  +0.0000i     0.4638  +0.0000i     1.2348  +0.0000i 

 The matrix Q is
   -0.4983  +0.0000i     0.3694  +0.0000i    -0.4754  +0.0000i     0.2791  +0.0000i     0.1950  +0.0000i     0.2416  +0.0000i     0.1869  +0.0000i     0.4242  +0.0000i 
   -0.1045  +0.0000i     0.3309  +0.0000i     0.5730  +0.0000i    -0.5566  +0.0000i     0.0877  +0.0000i     0.3543  +0.0000i     0.1761  +0.0000i     0.2779  +0.0000i 
   -0.2586  +0.0000i    -0.4457  +0.0000i    -0.2838  +0.0000i    -0.5436  +0.0000i     0.5524  +0.0000i    -0.1064  +0.0000i    -0.2040  +0.0000i     0.0205  +0.0000i 
   -0.0040  +0.0000i     0.3845  +0.0000i     0.2469  +0.0000i     0.2965  +0.0000i     0.5799  +0.0000i     0.0840  +0.0000i    -0.4788  +0.0000i    -0.3614  +0.0000i 
    0.7958  +0.0000i     0.1597  +0.0000i    -0.3420  +0.0000i    -0.1047  +0.0000i     0.3370  +0.0000i     0.1813  +0.0000i     0.2275  +0.0000i     0.1229  +0.0000i 
   -0.0600  +0.0000i    -0.4599  +0.0000i     0.3487  +0.0000i     0.3910  +0.0000i     0.4005  +0.0000i     0.1010  +0.0000i     0.5819  +0.0000i    -0.0345  +0.0000i 
   -0.0539  +0.0000i     0.3817  +0.0000i     0.0501  +0.0000i    -0.1114  +0.0000i     0.1751  +0.0000i    -0.8212  +0.0000i     0.3606  +0.0000i    -0.0380  +0.0000i 
    0.1846  +0.0000i    -0.1577  +0.0000i     0.2510  +0.0000i     0.2293  +0.0000i     0.0911  +0.0000i    -0.2834  +0.0000i    -0.3779  +0.0000i     0.7708  +0.0000i 

 The upper part of the matrix U is
   -0.2544  +0.0000i    -0.1844  +0.0000i     0.7632  +0.0000i     0.5646  +0.0000i     0.0000  +0.0000i     0.0000  +0.0000i     0.0000  +0.0000i     0.0000  +0.0000i 
    0.4272  +0.0000i    -0.0454  +0.0000i    -0.2918  +0.0000i     0.5721  +0.0000i     0.1446  +0.0000i    -0.1611  +0.0000i     0.3609  +0.0000i    -0.4752  +0.0000i 
    0.6936  +0.0000i     0.3812  +0.0000i     0.2606  +0.0000i     0.0848  +0.0000i    -0.3359  +0.0000i    -0.1592  +0.0000i    -0.3242  +0.0000i     0.2348  +0.0000i 
    0.2320  +0.0000i    -0.4483  +0.0000i    -0.1629  +0.0000i     0.1784  +0.0000i    -0.2898  +0.0000i     0.7525  +0.0000i    -0.0511  +0.0000i     0.1841  +0.0000i 

 The vector ALPHAR is 
   0.0000   0.0000   0.0000   0.0000

 The vector ALPHAI is 
  -1.4991  -1.3690   1.0985   0.9993

 The vector BETA is 
   0.1250   0.5000   0.5000   2.0000
</PRE>

<HR>
<p>
<A HREF=..\libindex.html><B>Return to index</B></A></BODY>
</HTML>