x04da is an easy-to-use method to print a
complex
matrix stored in a two-dimensional array.

# Syntax

C# |
---|

public static void x04da( string matrix, string diag, int m, int n, Complex[,] a, string title, out int ifail ) |

Visual Basic |
---|

Public Shared Sub x04da ( _ matrix As String, _ diag As String, _ m As Integer, _ n As Integer, _ a As Complex(,), _ title As String, _ <OutAttribute> ByRef ifail As Integer _ ) |

Visual C++ |
---|

public: static void x04da( String^ matrix, String^ diag, int m, int n, array<Complex,2>^ a, String^ title, [OutAttribute] int% ifail ) |

F# |
---|

static member x04da : matrix : string * diag : string * m : int * n : int * a : Complex[,] * title : string * ifail : int byref -> unit |

#### Parameters

- matrix
- Type: System..::..String
*On entry*: indicates the part of the matrix to be printed.- ${\mathbf{matrix}}=\text{"G"}$
- The whole of the rectangular matrix.
- ${\mathbf{matrix}}=\text{"L"}$
- The lower triangle of the matrix, or the lower trapezium if the matrix has more rows than columns.
- ${\mathbf{matrix}}=\text{"U"}$
- The upper triangle of the matrix, or the upper trapezium if the matrix has more columns than rows.

*Constraint*: ${\mathbf{matrix}}=\text{"G"}$, $\text{"L"}$ or $\text{"U"}$.

- diag
- Type: System..::..String
*On entry*: unless ${\mathbf{matrix}}=\text{"G"}$, diag must specify whether the diagonal elements of the matrix are to be printed.- ${\mathbf{diag}}=\text{"B"}$
- The diagonal elements of the matrix are not referenced and not printed.
- ${\mathbf{diag}}=\text{"U"}$
- The diagonal elements of the matrix are not referenced, but are assumed all to be unity, and are printed as such.
- ${\mathbf{diag}}=\text{"N"}$
- The diagonal elements of the matrix are referenced and printed.

If ${\mathbf{matrix}}=\text{"G"}$, then diag need not be set.*Constraint*: if ${\mathbf{matrix}}\ne \text{"G"}$, ${\mathbf{diag}}=\text{"B"}$, $\text{"U"}$ or $\text{"N"}$.

- m
- Type: System..::..Int32

- n
- Type: System..::..Int32

- a
- Type: array<NagLibrary..::..Complex,2>[,](,)[,][,]An array of size [dim1, dim2]
**Note:**dim1 must satisfy the constraint: $\mathrm{dim1}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$**Note:**the second dimension of the array a must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$.

- title
- Type: System..::..String
*On entry*: a title to be printed above the matrix.If ${\mathbf{title}}=\text{''}$, 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.

- ifail
- Type: System..::..Int32%
*On exit*: ${\mathbf{ifail}}={0}$ unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).

# Description

x04da prints a
complex
matrix. It is an easy-to-use driver for x04db. The method uses default values for the format in which numbers are printed, for labelling the rows and columns, and for output record length.

x04da will choose a format code such that numbers will be printed with
an $\mathrm{F}8.4$, an $\mathrm{F}11.4$ or a $1\mathrm{PE}13.4$ format.
The
$\mathrm{F}8.4$ code is chosen if the sizes of all the matrix elements to be printed lie between $0.001$ and $1.0$. The
$\mathrm{F}11.4$ code is chosen if the sizes of all the matrix elements to be printed lie between $0.001$ and $9999.9999$. Otherwise the
$1\mathrm{PE}13.4$ code is chosen. The chosen code is used to print each complex element of the matrix with the real part above the imaginary part.

The matrix is printed with integer row and column labels, and with a maximum record length of $80$.

The matrix is output to the unit defined by (X04ABF not in this release).

# References

None.

# Error Indicators and Warnings

Errors or warnings detected by the method:

Some error messages may refer to parameters that are dropped from this interface
(LDA) In these
cases, an error in another parameter has usually caused an incorrect value to be inferred.

- ${\mathbf{ifail}}=1$
On entry, ${\mathbf{matrix}}\ne \text{"G"}$, $\text{"L"}$ or $\text{"U"}$.

- ${\mathbf{ifail}}=2$
On entry, ${\mathbf{matrix}}=\text{"L"}$ or $\text{"U"}$, but ${\mathbf{diag}}\ne \text{"N"}$, $\text{"U"}$ or $\text{"B"}$.

- ${\mathbf{ifail}}=-9000$
- An error occured, see message report.
- ${\mathbf{ifail}}=-6000$
- Invalid Parameters $\u2329\mathit{\text{value}}\u232a$
- ${\mathbf{ifail}}=-4000$
- Invalid dimension for array $\u2329\mathit{\text{value}}\u232a$
- ${\mathbf{ifail}}=-8000$
- Negative dimension for array $\u2329\mathit{\text{value}}\u232a$
- ${\mathbf{ifail}}=-6000$
- Invalid Parameters $\u2329\mathit{\text{value}}\u232a$

# Accuracy

Not applicable.

# Parallelism and Performance

None.