x04dbc prints a Complex matrix, or part of it, using a format specifier supplied by you.
The matrix is output to the file specified by
outfile or,
by default, to standard output.
None.
Not applicable.
x04dbc may be used to print a vector, either as a row or as a column. The following code fragment illustrates possible calls.
#include <nag.h>
#include <nagx04.h>
#include <nag_stdlib.h>
Complex *a = 0;
Integer n = 4;
if ( !(a = NAG_ALLOC(n, Complex)) )
{
Vprintf("Allocation failure\n");
return -1;
}
/* Read A from data file */
for (i = 0; i < n; ++i)
Vscanf("%lf%lf", &a[i].re, &a[i].im);
/* Print vector A as a row vector */
x04dbc(Nag_RowMajor, Nag_GeneralMatrix, Nag_NonUnitDiag,
1, n, a, n, Nag_BracketForm, 0, 0, Nag_NoLabels, 0,
Nag_IntegerLabels, 0, 0, 0, 0, NAGERR_DEFAULT);
/* Print vector A as a column vector */
x04dbc(Nag_RowMajor, Nag_GeneralMatrix, Nag_NonUnitDiag,
n, 1, a, 1, Nag_BracketForm, 0, 0, Nag_IntegerLabels, 0,
Nag_NoLabels, 0, 0, 0, 0, NAGERR_DEFAULT);