## MB01QD

### Matrix scaling (lower level routine)

[Specification] [Arguments] [Method] [References] [Comments] [Example]

Purpose

```  To multiply the M by N real matrix A by the real scalar CTO/CFROM.
This is done without over/underflow as long as the final result
CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that
A may be full, (block) upper triangular, (block) lower triangular,
(block) upper Hessenberg, or banded.

```
Specification
```      SUBROUTINE MB01QD( TYPE, M, N, KL, KU, CFROM, CTO, NBL, NROWS, A,
\$                   LDA, INFO )
C     .. Scalar Arguments ..
CHARACTER          TYPE
INTEGER            INFO, KL, KU, LDA, M, N, NBL
DOUBLE PRECISION   CFROM, CTO
C     .. Array Arguments ..
INTEGER            NROWS ( * )
DOUBLE PRECISION   A( LDA, * )

```
Arguments

Mode Parameters

```  TYPE    CHARACTER*1
TYPE indices the storage type of the input matrix.
= 'G':  A is a full matrix.
= 'L':  A is a (block) lower triangular matrix.
= 'U':  A is a (block) upper triangular matrix.
= 'H':  A is a (block) upper Hessenberg matrix.
= 'B':  A is a symmetric band matrix with lower bandwidth
KL and upper bandwidth KU and with the only the
lower half stored.
= 'Q':  A is a symmetric band matrix with lower bandwidth
KL and upper bandwidth KU and with the only the
upper half stored.
= 'Z':  A is a band matrix with lower bandwidth KL and
upper bandwidth KU.

```
Input/Output Parameters
```  M       (input) INTEGER
The number of rows of the matrix A.  M >= 0.

N       (input) INTEGER
The number of columns of the matrix A.  N >= 0.

KL      (input) INTEGER
The lower bandwidth of A.  Referenced only if TYPE = 'B',
'Q' or 'Z'.

KU      (input) INTEGER
The upper bandwidth of A.  Referenced only if TYPE = 'B',
'Q' or 'Z'.

CFROM   (input) DOUBLE PRECISION
CTO     (input) DOUBLE PRECISION
The matrix A is multiplied by CTO/CFROM. A(I,J) is
computed without over/underflow if the final result
CTO*A(I,J)/CFROM can be represented without over/
underflow.  CFROM must be nonzero.

NBL     (input) INTEGER
The number of diagonal blocks of the matrix A, if it has a
block structure.  To specify that matrix A has no block
structure, set NBL = 0.  NBL >= 0.

NROWS   (input) INTEGER array, dimension max(1,NBL)
NROWS(i) contains the number of rows and columns of the
i-th diagonal block of matrix A.  The sum of the values
NROWS(i),  for  i = 1: NBL,  should be equal to min(M,N).
The array  NROWS  is not referenced if NBL = 0.

A       (input/output) DOUBLE PRECISION array, dimension (LDA,N)
The matrix to be multiplied by CTO/CFROM.  See TYPE for
the storage type.

LDA     (input) INTEGER
The leading dimension of the array A.  LDA >= max(1,M).

```
Error Indicator
```  INFO    INTEGER
Not used in this implementation.

```
Method
```  Matrix A is multiplied by the real scalar CTO/CFROM, taking into
account the specified storage mode of the matrix.
MB01QD is a version of the LAPACK routine DLASCL, modified for
dealing with block triangular, or block Hessenberg matrices.
For efficiency, no tests of the input scalar parameters are
performed.

```
```  None
```
Example

Program Text

```  None
```
Program Data
```  None
```
Program Results
```  None
```