## 1Purpose

f06qhf forms the real $m$ by $n$ rectangular or trapezoidal matrix $A$ given by

## 2Specification

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

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}$Real (Kind=nag_wp) Input
On entry: the value to be assigned to the off-diagonal elements of $A$.
5: $\mathbf{diag}$Real (Kind=nag_wp) Input
On entry: the value to be assigned to the diagonal elements of $A$.
6: $\mathbf{a}\left({\mathbf{lda}},*\right)$Real (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 f06qhf is called.
Constraint: ${\mathbf{lda}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$.

None.

Not applicable.

## 8Parallelism and Performance

f06qhf is not threaded in any implementation.