## 1Purpose

f06thf forms the complex $m$ by $n$ rectangular or trapezoidal matrix $A$ given by

## 2Specification

Fortran Interface
 Subroutine f06thf ( m, n, con, diag, a, lda)
 Integer, Intent (In) :: m, n, lda Complex (Kind=nag_wp), Intent (In) :: con, diag Complex (Kind=nag_wp), Intent (Inout) :: a(lda,*) Character (1), Intent (In) :: matrix
#include <nag.h>
 void f06thf_ (const char *matrix, const Integer *m, const Integer *n, const Complex *con, const Complex *diag, Complex a[], const Integer *lda, const Charlen length_matrix)
The routine may be called by the names f06thf or nagf_blas_zmload.

None.

None.

## 5Arguments

1: $\mathbf{matrix}$Character(1) Input
On entry: the matrix type.
${\mathbf{matrix}}=\text{'G'}$
General matrix.
${\mathbf{matrix}}=\text{'U'}$
Upper trapezoidal matrix (upper triangular if $m=n$).
${\mathbf{matrix}}=\text{'L'}$
Lower trapezoidal matrix (lower triangular if $m=n$).
Constraint: ${\mathbf{matrix}}=\text{'G'}$, $\text{'U'}$ or $\text{'L'}$.
2: $\mathbf{m}$Integer Input
On entry: $m$, the number of rows of the matrix $A$.
Constraint: ${\mathbf{m}}\ge 0$.
3: $\mathbf{n}$Integer Input
On entry: $n$, the number of columns of the matrix $A$.
Constraint: ${\mathbf{n}}\ge 0$.
4: $\mathbf{con}$Complex (Kind=nag_wp) Input
On entry: the value to be assigned to the off-diagonal elements of $A$.
5: $\mathbf{diag}$Complex (Kind=nag_wp) Input
On entry: the value to be assigned to the diagonal elements of $A$.
6: $\mathbf{a}\left({\mathbf{lda}},*\right)$Complex (Kind=nag_wp) array Output
Note: the second dimension of the array a must be at least ${\mathbf{n}}$.
On exit: the $m$ by $n$ general or trapezoidal matrix $A$.
• If ${\mathbf{matrix}}=\text{'U'}$, $A$ is upper trapezoidal and the elements of the array below the diagonal are not referenced.
• If ${\mathbf{matrix}}=\text{'L'}$, $A$ is lower trapezoidal and the elements of the array above the diagonal are not referenced.
7: $\mathbf{lda}$Integer Input
On entry: the first dimension of the array a as declared in the (sub)program from which f06thf is called.
Constraint: ${\mathbf{lda}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$.

None.

Not applicable.

## 8Parallelism and Performance

f06thf is not threaded in any implementation.