PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_matop_ztrttp (f01vb)
Purpose
nag_matop_ztrttp (f01vb) copies a complex triangular matrix, stored in a full format array, to a packed format array.
Syntax
Description
nag_matop_ztrttp (f01vb) packs a complex
by
triangular matrix
, stored conventionally in a full format array, into an array of length
. The matrix is packed by columns. This function is intended for possible use in conjunction with functions from
Chapters F07,
F08 and
F16 where some functions use triangular matrices stored in the packed form.
Packed storage format is described in
Packed storage in the F07 Chapter Introduction.
References
None.
Parameters
Compulsory Input Parameters
- 1:
– string (length ≥ 1)
-
Specifies whether
is upper or lower triangular.
- is upper triangular.
- is lower triangular.
Constraint:
or .
- 2:
– complex array
-
The first dimension of the array
a must be at least
.
The second dimension of the array
a must be at least
.
The triangular matrix
.
- If , is upper triangular and the elements of the array below the diagonal are not referenced.
- If , is lower triangular and the elements of the array above the diagonal are not referenced.
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the second dimension of the array
a.
, the order of the matrix .
Constraint:
.
Output Parameters
- 1:
– complex array
-
The
by
triangular matrix
, packed by columns.
More precisely,
- if , the upper triangle of is stored with element in for ;
- if , the lower triangle of is stored with element in for .
- 2:
– int64int32nag_int scalar
unless the function detects an error (see
Error Indicators and Warnings).
Error Indicators and Warnings
-
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
Accuracy
Not applicable.
Further Comments
None.
Example
This example reads in a triangular matrix and copies it to packed format.
Open in the MATLAB editor:
f01vb_example
function f01vb_example
fprintf('f01vb example results\n\n');
uplo = 'u';
a = [1.1000 + 1.1000i, 1.2000 + 1.2000i, 1.3000 + 1.3000i, 1.4000 + 1.4000i;
0, 2.2000 + 2.2000i, 2.3000 + 2.3000i, 2.4000 + 2.4000i;
0, 0, 3.3000 + 3.3000i, 3.4000 + 3.4000i;
0, 0, 0, 4.4000 + 4.4000i];
fprintf('\n');
[ifail] = x04db(uplo, 'n', a, 'b', 'f5.2', 'Unpacked matrix a:', 'i', ...
'i', int64(80), int64(0));
[ap, info] = f01vb(uplo, a);
fprintf('\n');
[ifail] = x04db('g', 'x', ap, 'b', 'f5.2', 'Packed matrix ap:', 'i', ...
'n', int64(80), int64(0));
f01vb example results
Unpacked matrix a:
1 2 3 4
1 ( 1.10, 1.10) ( 1.20, 1.20) ( 1.30, 1.30) ( 1.40, 1.40)
2 ( 2.20, 2.20) ( 2.30, 2.30) ( 2.40, 2.40)
3 ( 3.30, 3.30) ( 3.40, 3.40)
4 ( 4.40, 4.40)
Packed matrix ap:
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)
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015