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_dtfttr (f01vg)

Purpose

nag_matop_dtfttr (f01vg) unpacks a real triangular matrix stored in Rectangular Full Packed (RFP) format to full format in a two-dimensional array. The RFP storage format is described in Section [Rectangular Full Packed (RFP) Storage] in the F07 Chapter Introduction.

Syntax

[a, info] = f01vg(transr, uplo, n, arf)
[a, info] = nag_matop_dtfttr(transr, uplo, n, arf)

Description

nag_matop_dtfttr (f01vg) unpacks a real nn by nn triangular matrix AA, stored in RFP format to conventional storage in a two-dimensional array. 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 RFP representation of AA is normal or transposed.
transr = 'N'transr='N'
The matrix AA is stored in normal RFP format.
transr = 'T'transr='T'
The matrix AA is stored in transposed RFP format.
Constraint: transr = 'N'transr='N' or 'T''T'.
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) – double array
The nn by nn 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

lda

Output Parameters

1:     a(lda, : :) – double array
The first dimension of the array a will be max (1,n)max(1,n)
The second dimension of the array will be nn
ldamax (1,n)ldamax(1,n).
The triangular matrix AA.
  • If uplo = 'U'uplo='U', aa is upper triangular and the elements of the array below the diagonal are not referenced.
  • If uplo = 'L'uplo='L', aa is lower triangular and the elements of the array above the diagonal are not referenced.
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: a, 6: lda, 7: 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

Not applicable.

Further Comments

None.

Example

function nag_matop_dtfttr_example
transr = 'n';
uplo   = 'u';
n      = int64(4);
arf = [1.30; 2.30; 3.30; 1.10; 1.20; 1.40; 2.40; 3.40; 4.40; 2.20];
% Print the Rectangular Full Packed array
fprintf('\n');
[ifail] = ...
    nag_file_print_matrix_real_gen_comp('g', 'x', arf, 'f5.2', 'RFP Packed Array arf:', 'i', ...
                {''}, 'n', {''}, int64(80), int64(0));
% Convert to triangular form
[a, info] = nag_matop_dtfttr(transr, uplo, n, arf);
% Print the unpacked matrix
fprintf('\n');
[ifail] = ...
    nag_file_print_matrix_real_gen_comp(uplo, 'n', a, 'f5.2', 'Unpacked matrix a:', 'i', ...
                {''}, 'i', {''}, int64(80), int64(0))
 

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

 Unpacked matrix a:
       1    2    3    4
 1  1.10 1.20 1.30 1.40
 2       2.20 2.30 2.40
 3            3.30 3.40
 4                 4.40

ifail =

                    0


function f01vg_example
transr = 'n';
uplo   = 'u';
n      = int64(4);
arf = [1.30; 2.30; 3.30; 1.10; 1.20; 1.40; 2.40; 3.40; 4.40; 2.20];
% Print the Rectangular Full Packed array
fprintf('\n');
[ifail] = x04cb('g', 'x', arf, 'f5.2', 'RFP Packed Array arf:', 'i', ...
                {''}, 'n', {''}, int64(80), int64(0));
% Convert to triangular form
[a, info] = f01vg(transr, uplo, n, arf);
% Print the unpacked matrix
fprintf('\n');
[ifail] = x04cb(uplo, 'n', a, 'f5.2', 'Unpacked matrix a:', 'i', ...
                {''}, 'i', {''}, int64(80), int64(0))
 

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

 Unpacked matrix a:
       1    2    3    4
 1  1.10 1.20 1.30 1.40
 2       2.20 2.30 2.40
 3            3.30 3.40
 4                 4.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