MA02AD

Matrix transposition

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

Purpose

  To transpose all or part of a two-dimensional matrix A into
  another matrix B.

Specification
      SUBROUTINE MA02AD( JOB, M, N, A, LDA, B, LDB )
C     .. Scalar Arguments ..
      CHARACTER          JOB
      INTEGER            LDA, LDB, M, N
C     .. Array Arguments ..
      DOUBLE PRECISION   A(LDA,*), B(LDB,*)

Arguments

Mode Parameters

  JOB     CHARACTER*1
          Specifies the part of the matrix A to be transposed into B
          as follows:
          = 'U': Upper triangular part;
          = 'L': Lower triangular part;
          Otherwise:  All of the matrix A.

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.

  A      (input) DOUBLE PRECISION array, dimension (LDA,N)
         The m-by-n matrix A.  If JOB = 'U', only the upper
         triangle or trapezoid is accessed; if JOB = 'L', only the
         lower triangle or trapezoid is accessed.

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

  B      (output) DOUBLE PRECISION array, dimension (LDB,M)
         B = A' in the locations specified by JOB.

  LDB    INTEGER
         The leading dimension of the array B.  LDB >= max(1,N).

Further Comments
  None
Example

Program Text

  None
Program Data
  None
Program Results
  None

Return to Supporting Routines index