The routine may be called by the names x04caf or nagf_file_print_matrix_real_gen.
x04caf prints a real matrix. It is an easy-to-use driver for x04cbf. The routine uses default values for the format in which numbers are printed, for labelling the rows and columns, and for output record length.
x04caf will choose a format code such that numbers will be printed with
an , an or a format.
code is chosen if the sizes of all the matrix elements to be printed lie between and . The
code is chosen if the sizes of all the matrix elements to be printed lie between and . Otherwise the
code is chosen.
The matrix is printed with integer row and column labels, and with a maximum record length of .
The matrix is output to the unit defined by x04abf.
1: – Character(1)Input
On entry: indicates the part of the matrix to be printed.
The whole of the rectangular matrix.
The lower triangle of the matrix, or the lower trapezium if the matrix has more rows than columns.
The upper triangle of the matrix, or the upper trapezium if the matrix has more columns than rows.
, or .
2: – Character(1)Input
On entry: unless , diag must specify 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.
On entry: the number of rows and columns of the matrix, respectively, to be printed.
If either m or n is less than , x04caf will exit immediately after printing title; no row or column labels are printed.
5: – Real (Kind=nag_wp) arrayInput
Note: the second dimension of the array a
must be at least
On entry: the matrix to be printed. Only the elements that will be referred to, as specified by arguments matrix and diag, need be set.
6: – IntegerInput
On entry: the first dimension of the array a as declared in the (sub)program from which x04caf is called.
7: – Character(*)Input
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 characters, the contents of title will be wrapped onto more than one line, with the break after characters.
Any trailing blank characters in title are ignored.
8: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).