hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_lapack_zgebak (f08nw)

Purpose

nag_lapack_zgebak (f08nw) transforms eigenvectors of a balanced matrix to those of the original complex general matrix.

Syntax

[v, info] = f08nw(job, side, ilo, ihi, scale, v, 'n', n, 'm', m)
[v, info] = nag_lapack_zgebak(job, side, ilo, ihi, scale, v, 'n', n, 'm', m)

Description

nag_lapack_zgebak (f08nw) is intended to be used after a complex general matrix AA has been balanced by nag_lapack_zgebal (f08nv), and eigenvectors of the balanced matrix A22A22 have subsequently been computed.
For a description of balancing, see the document for nag_lapack_zgebal (f08nv). The balanced matrix AA is obtained as A = DPAPTD1A=DPAPTD-1, where PP is a permutation matrix and DD is a diagonal scaling matrix. This function transforms left or right eigenvectors as follows:

References

None.

Parameters

Compulsory Input Parameters

1:     job – string (length ≥ 1)
This must be the same parameter job as supplied to nag_lapack_zgebal (f08nv).
Constraint: job = 'N'job='N', 'P''P', 'S''S' or 'B''B'.
2:     side – string (length ≥ 1)
Indicates whether left or right eigenvectors are to be transformed.
side = 'L'side='L'
The left eigenvectors are transformed.
side = 'R'side='R'
The right eigenvectors are transformed.
Constraint: side = 'L'side='L' or 'R''R'.
3:     ilo – int64int32nag_int scalar
4:     ihi – int64int32nag_int scalar
The values iloilo and ihiihi, as returned by nag_lapack_zgebal (f08nv).
Constraints:
  • if n > 0n>0, 1 ilo ihi n 1 ilo ihi n ;
  • if n = 0n=0, ilo = 1ilo=1 and ihi = 0ihi=0.
5:     scale( : :) – double array
Note: the dimension of the array scale must be at least max (1,n)max(1,n).
Details of the permutations and/or the scaling factors used to balance the original complex general matrix, as returned by nag_lapack_zgebal (f08nv).
6:     v(ldv, : :) – complex array
The first dimension of the array v must be at least max (1,n)max(1,n)
The second dimension of the array must be at least max (1,m)max(1,m)
The matrix of left or right eigenvectors to be transformed.

Optional Input Parameters

1:     n – int64int32nag_int scalar
Default: The first dimension of the array v.
nn, the number of rows of the matrix of eigenvectors.
Constraint: n0n0.
2:     m – int64int32nag_int scalar
Default: The second dimension of the array v.
mm, the number of columns of the matrix of eigenvectors.
Constraint: m0m0.

Input Parameters Omitted from the MATLAB Interface

ldv

Output Parameters

1:     v(ldv, : :) – complex array
The first dimension of the array v will be max (1,n)max(1,n)
The second dimension of the array will be max (1,m)max(1,m)
ldv max (1,n) ldv max(1,n) .
The transformed eigenvectors.
2:     info – int64int32nag_int scalar
info = 0info=0 unless the function detects an error (see Section [Error Indicators and Warnings]).

Error Indicators and Warnings

  info = iinfo=-i
If info = iinfo=-i, parameter ii had an illegal value on entry. The parameters are numbered as follows:
1: job, 2: side, 3: n, 4: ilo, 5: ihi, 6: scale, 7: m, 8: v, 9: ldv, 10: info.
It is possible that info refers to a parameter that is omitted from the MATLAB interface. This usually indicates that an error in one of the other input parameters has caused an incorrect value to be inferred.

Accuracy

The errors are negligible.

Further Comments

The total number of real floating point operations is approximately proportional to nmnm.
The real analogue of this function is nag_lapack_dgebak (f08nj).

Example

function nag_lapack_zgebak_example
job = 'Both';
side = 'Right';
ilo = int64(2);
ihi = int64(3);
scale = [3;
     1;
     1;
     1];
v = [1,  0.6032225283394844 - 0.3967774716605157i, ...
    0.2982663996834333 + 0.7017336003165667i,  0.7768255861335958 + 0.2231744138664043i;
      0 + 0i,  -0.06157074124970285 + 0.04126986941002295i, ...
     0.4613150078539515 - 1.765599476879182e-17i,  -0.2071937862358928 - 0.2450198886726209i;
      0 + 0i,  0.08223214401049841 + 0i, ...
    0.4251208555461429 + 0.284951615584963i,  -0.01188956374147339 + 0.4371839616835084i;
      0 + 0i,  0 + 0i,  0 + 0i,  0.1452103084889974 + 0i];
[vOut, info] = nag_lapack_zgebak(job, side, ilo, ihi, scale, v)
 

vOut =

   0.0000 + 0.0000i   0.0000 + 0.0000i   0.0000 + 0.0000i   0.1452 + 0.0000i
   0.0000 + 0.0000i  -0.0616 + 0.0413i   0.4613 - 0.0000i  -0.2072 - 0.2450i
   1.0000 + 0.0000i   0.6032 - 0.3968i   0.2983 + 0.7017i   0.7768 + 0.2232i
   0.0000 + 0.0000i   0.0822 + 0.0000i   0.4251 + 0.2850i  -0.0119 + 0.4372i


info =

                    0


function f08nw_example
job = 'Both';
side = 'Right';
ilo = int64(2);
ihi = int64(3);
scale = [3;
     1;
     1;
     1];
v = [1,  0.6032225283394844 - 0.3967774716605157i, ...
    0.2982663996834333 + 0.7017336003165667i,  0.7768255861335958 + 0.2231744138664043i;
      0 + 0i,  -0.06157074124970285 + 0.04126986941002295i, ...
     0.4613150078539515 - 1.765599476879182e-17i,  -0.2071937862358928 - 0.2450198886726209i;
      0 + 0i,  0.08223214401049841 + 0i, ...
    0.4251208555461429 + 0.284951615584963i,  -0.01188956374147339 + 0.4371839616835084i;
      0 + 0i,  0 + 0i,  0 + 0i,  0.1452103084889974 + 0i];
[vOut, info] = f08nw(job, side, ilo, ihi, scale, v)
 

vOut =

   0.0000 + 0.0000i   0.0000 + 0.0000i   0.0000 + 0.0000i   0.1452 + 0.0000i
   0.0000 + 0.0000i  -0.0616 + 0.0413i   0.4613 - 0.0000i  -0.2072 - 0.2450i
   1.0000 + 0.0000i   0.6032 - 0.3968i   0.2983 + 0.7017i   0.7768 + 0.2232i
   0.0000 + 0.0000i   0.0822 + 0.0000i   0.4251 + 0.2850i  -0.0119 + 0.4372i


info =

                    0



PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013