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_matop_ztfttp (f01vm)

Purpose

nag_matop_ztfttp (f01vm) copies a complex triangular matrix stored in a Rectangular Full Packed (RFP) format to packed format. The RFP storage format is described in Section [Rectangular Full Packed (RFP) Storage] in the F07 Chapter Introduction and the packed storage format is described in Section [Packed storage] in the F07 Chapter Introduction.

Syntax

[ap, info] = f01vm(transr, uplo, n, arf)
[ap, info] = nag_matop_ztfttp(transr, uplo, n, arf)

Description

nag_matop_ztfttp (f01vm) packs a complex nn by nn triangular matrix AA stored in RFP format to packed format. This function is intended for possible use in conjunction with functions from Chapter F07 where some functions that use triangular matrices store them in RFP format.

References

None.

Parameters

Compulsory Input Parameters

1:     transr – string (length ≥ 1)
Specifies whether the normal RFP representation of AA or its conjugate transpose is stored.
transr = 'N'transr='N'
The matrix AA is stored in normal RFP format.
transr = 'C'transr='C'
The conjugate transpose of the RFP representation of the matrix AA is stored.
Constraint: transr = 'N'transr='N' or 'C''C'.
2:     uplo – string (length ≥ 1)
Specifies whether AA is upper or lower triangular.
uplo = 'U'uplo='U'
AA is upper triangular.
uplo = 'L'uplo='L'
AA is lower triangular.
Constraint: uplo = 'U'uplo='U' or 'L''L'.
3:     n – int64int32nag_int scalar
nn, the order of the matrix AA.
Constraint: n0n0.
4:     arf(n × (n + 1) / 2n×(n+1)/2) – complex array
The triangular matrix AA in RFP format, as described in Section [Rectangular Full Packed (RFP) Storage] in the F07 Chapter Introduction.

Optional Input Parameters

None.

Input Parameters Omitted from the MATLAB Interface

None.

Output Parameters

1:     ap(n × (n + 1) / 2n×(n+1)/2) – complex array
The nn by nn triangular matrix AA, packed by columns.
More precisely,
  • if uplo = 'U'uplo='U', the upper triangle of AA is stored with element AijAij in ap(i + j(j1) / 2)api+j(j-1)/2 for ijij;
  • if uplo = 'L'uplo='L', the lower triangle of AA is stored with element AijAij in ap(i + (2nj)(j1) / 2)api+(2n-j)(j-1)/2 for ijij.
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: transr, 2: uplo, 3: n, 4: arf, 5: ap, 6: info.

Accuracy

Not applicable.

Further Comments

None.

Example

function nag_matop_ztfttp_example
transr = 'n';
uplo   = 'u';
n      = int64(4);
arf = [1.1 + 1.1i;
       1.2 + 1.2i;
       2.2 + 2.2i;
       1.3 + 1.3i;
       2.3 + 2.3i;
       3.3 + 3.3i;
       1.4 + 1.4i;
       2.4 + 2.4i;
       3.4 + 3.4i;
       4.4 + 4.4i];
% Print the Rectangular Full Packed array
fprintf('\n');
[ifail] = nag_file_print_matrix_complex_gen_comp('g', 'x', arf, 'b', 'f5.2', 'RFP Packed Array arf:', 'i', ...
                'n', int64(80), int64(0));
% Convert to packed vector form
[ap, info] = nag_matop_ztfttp(transr, uplo, n, arf);
% Print the packed vector
fprintf('\n');
[ifail] = nag_file_print_matrix_complex_gen_comp('g', 'x', ap, 'b', 'f5.2', 'Packed Array ap:', 'i', ...
                'n', int64(80), int64(0))
 

 RFP Packed Array arf:
  1  ( 1.10, 1.10)
  2  ( 1.20, 1.20)
  3  ( 2.20, 2.20)
  4  ( 1.30, 1.30)
  5  ( 2.30, 2.30)
  6  ( 3.30, 3.30)
  7  ( 1.40, 1.40)
  8  ( 2.40, 2.40)
  9  ( 3.40, 3.40)
 10  ( 4.40, 4.40)

 Packed Array ap:
  1  ( 1.30,-1.30)
  2  ( 2.30,-2.30)
  3  ( 4.40,-4.40)
  4  ( 1.10, 1.10)
  5  ( 1.20, 1.20)
  6  ( 2.20, 2.20)
  7  ( 3.30, 3.30)
  8  ( 1.40, 1.40)
  9  ( 2.40, 2.40)
 10  ( 3.40, 3.40)

ifail =

                    0


function f01vm_example
transr = 'n';
uplo   = 'u';
n      = int64(4);
arf = [1.1 + 1.1i;
       1.2 + 1.2i;
       2.2 + 2.2i;
       1.3 + 1.3i;
       2.3 + 2.3i;
       3.3 + 3.3i;
       1.4 + 1.4i;
       2.4 + 2.4i;
       3.4 + 3.4i;
       4.4 + 4.4i];
% Print the Rectangular Full Packed array
fprintf('\n');
[ifail] = x04db('g', 'x', arf, 'b', 'f5.2', 'RFP Packed Array arf:', 'i', ...
                'n', int64(80), int64(0));
% Convert to packed vector form
[ap, info] = f01vm(transr, uplo, n, arf);
% Print the packed vector
fprintf('\n');
[ifail] = x04db('g', 'x', ap, 'b', 'f5.2', 'Packed Array ap:', 'i', ...
                'n', int64(80), int64(0))
 

 RFP Packed Array arf:
  1  ( 1.10, 1.10)
  2  ( 1.20, 1.20)
  3  ( 2.20, 2.20)
  4  ( 1.30, 1.30)
  5  ( 2.30, 2.30)
  6  ( 3.30, 3.30)
  7  ( 1.40, 1.40)
  8  ( 2.40, 2.40)
  9  ( 3.40, 3.40)
 10  ( 4.40, 4.40)

 Packed Array ap:
  1  ( 1.30,-1.30)
  2  ( 2.30,-2.30)
  3  ( 4.40,-4.40)
  4  ( 1.10, 1.10)
  5  ( 1.20, 1.20)
  6  ( 2.20, 2.20)
  7  ( 3.30, 3.30)
  8  ( 1.40, 1.40)
  9  ( 2.40, 2.40)
 10  ( 3.40, 3.40)

ifail =

                    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