|
NAG[x04dec] NAG[nag_band_complx_mat_print] - Print complex packed banded matrix (easy-to-use)
|
|
Calling Sequence
x04dec(m, n, kl, ku, a, title, 'outfile'=outfile, 'fail'=fail)
nag_band_complx_mat_print(. . .)
Parameters
|
m - integer;
n - integer;
|
|
|
On entry: the number of rows and columns of the band matrix, respectively, to be printed.
|
|
If either m or n is less than 1, nag_band_complx_mat_print (x04dec) will exit immediately after printing title; no row or column labels are printed.
|
|
|
kl - integer;
|
|
|
On entry: the number of subdiagonals of the band matrix .
|
|
Constraint: . .
|
|
|
ku - integer;
|
|
|
On entry: the number of superdiagonals of the band matrix .
|
|
Constraint: . .
|
|
|
a - Matrix(1..dim1, 1..dim2, datatype=complex[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
|
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_band_complx_mat_print (x04dec) is an easy-to-use function to print a complex band matrix .
|
|
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_band_complx_mat_print (x04dec) is equivalent to a call to x04dfc (nag_band_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
|
|
>
|
m := 4:
n := 4:
kl := 1:
ku := 2:
title := "Details of factorization":
a := Matrix([[0+I, -6.98+I, 2.46+I, -2.73+I, 0],
[0.0329512893982808+I, 2.56+I, 2.46+I, 4.07+I, 0],
[0.9605233703438396+I, -5.932930470988539+I, -3.839143870881089+I, 0, 0],
[0.8056726812110376+I, -0.7269066639923109+I, 0, 0, 0]],
datatype=complex[8], order='C_order'):
try
FileTools[Remove]("matout.txt"):
catch "file does not exist":
end try:
NAG:-x04dec(m, n, kl, ku, 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"):
#
|
Details of factorization
1 2 3 4
1 -6.9800 2.4600 -2.7300
1.0000 1.0000 1.0000
2 0.0330 2.5600 2.4600 4.0700
1.0000 1.0000 1.0000 1.0000
3 0.9605 -5.9329 -3.8391
1.0000 1.0000 1.0000
4 0.8057 -0.7269
1.0000 1.0000
|
|