|
NAG[x04dcc] NAG[nag_pack_complx_mat_print] - Print complex packed triangular matrix (easy-to-use)
|
|
Calling Sequence
x04dcc(uplo, diag, n, a, title, 'outfile'=outfile, 'fail'=fail)
nag_pack_complx_mat_print(. . .)
Parameters
|
uplo - String;
|
|
|
On entry: indicates the type of the matrix to be printed
|
|
The matrix is lower triangular.
|
|
The matrix is upper triangular.
|
|
Constraint: "Nag_Lower" or "Nag_Upper". .
|
|
|
diag - String;
|
|
|
On entry: indicates whether the diagonal elements of the matrix are to be printed.
|
|
The diagonal elements of the matrix are not referenced and not printed.
|
|
The diagonal elements of the matrix are not referenced, but are assumed all to be unity, and are printed as such.
|
|
The diagonal elements of the matrix are referenced and printed.
|
|
Constraint: "Nag_NonRefDiag", "Nag_UnitDiag" or "Nag_NonUnitDiag". .
|
|
|
n - integer;
|
|
|
On entry: the order of the matrix to be printed.
|
|
If n is less than 1, nag_pack_complx_mat_print (x04dcc) will exit immediately after printing title; no row or column labels are printed.
|
|
|
a - Vector(1..dim, datatype=complex[8]);
|
|
|
Note: the dimension, dim, of the array a must be at least .
|
|
On entry: the matrix to be printed. The storage of elements depends on the storage order and uplo arguments as follows:
|
|
Note that a must have space for the diagonal elements of the matrix, even if these are not stored.
|
|
|
title - character;
|
|
|
On entry: a title to be printed above the matrix.
|
|
If , no title (and no blank line) will be printed.
|
|
If title contains more than 80 characters, the contents of title will be wrapped onto more than one line, with the break after 80 characters.
|
|
Any trailing blank characters in title are ignored.
|
|
|
'outfile'=outfile - character; (optional)
|
|
|
On entry: The name of a file to which intermediate or diagnostic output should be appended. If a value is not provided for this parameter then the behaviour of this routine is platform dependent. Usually all output will be suppressed, however on some platforms output will be produced and will be displayed in the Maple session.
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_pack_complx_mat_print (x04dcc) is an easy-to-use function to print a complex triangular matrix stored in a packed one-dimensional array.
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
"NE_NOT_APPEND_FILE"
Cannot open file for appending.
"NE_NOT_CLOSE_FILE"
Cannot close file .
"NE_NOT_WRITE_FILE"
Cannot open file for writing.
|
|
Further Comments
|
|
A call to nag_pack_complx_mat_print (x04dcc) is equivalent to a call to x04ddc (nag_pack_complx_mat_print_comp) with the following argument values:
ncols = 80
indent = 0
labrow = "Nag_IntegerLabels"
labcol = "Nag_IntegerLabels"
form = 0
cmplxform = "Nag_AboveForm"
|
|
|
Examples
|
|
>
|
uplo := "Nag_Lower":
diag := "Nag_NonUnitDiag":
n := 4:
title := "Factor":
a := Vector([1+I, 2-I, 3+I, 4-I, 5+I, 6-I, 7+I, 8-I, 9+I, 10-I, 11+I, 12-I], datatype=complex[8]):
if kernelopts(system) = "IBM INTEL LINUX"
and [NAG[NAGVersion]()][1] = 8 then
printf("x04dcc is not available in Mark 8 on IBM INTEL LINUX\n",%s): else
try
FileTools[Remove]("matout.txt"):
catch "file does not exist":
end try:
NAG:-x04dcc(uplo, diag, n, a, title, 'outfile'="matout.txt"):
do
outstring := FileTools[Text][ReadLine]("matout.txt"):
if outstring = 0 or outstring = NULL then break; end if:
printf("%s\n",outstring): od:
FileTools[Text][Close]("matout.txt"):
end if:
#
|
Factor
1 2 3 4
1 1.0000
1.0000
2 2.0000 5.0000
-1.0000 1.0000
3 3.0000 6.0000 8.0000
1.0000 -1.0000 -1.0000
4 4.0000 7.0000 9.0000 10.0000
-1.0000 1.0000 1.0000 -1.0000
|
|