MXYTF

Multiplies a matrix A by the transpose of a matrix B, ABT.

Required Arguments

A — Real NRA by NCA rectangular matrix.   (Input)

B — Real NRB by NCB rectangular matrix.   (Input)

C — Real NRC by NCC rectangular matrix containing the transpose product ABT.   (Output)

Optional Arguments

NRA — Number of rows in A.   (Input)
Default: NRA = size (A,1).

NCA — Number of columns in A.   (Input)
Default: NCA = size (A,2).

LDA — Leading dimension of A exactly as specified in the dimension statement of the calling program.   (Input)
Default: LDA = size (A,1).

NRB — Number of rows in B.   (Input)
Default: NRB = size (B,1).

NCB — Number of columns in B.   (Input)
NCB must be the same as NCA.
Default: NCB = size (B,2).

LDB — Leading dimension of B exactly as specified in the dimension statement of the calling program.   (Input)
Default: LDB = size (B,1).

NRC — Number of rows of C.   (Input)
NRC must be equal to NRA.
Default: NRC = size (C,1).

NCC — Number of columns of C.   (Input)
NCC must be equal to NRB.
Default: NCC = size (C,2).

LDC — Leading dimension of C exactly as specified in the dimension statement of the calling program.   (Input)
Default: LDC = size (C,1).

FORTRAN 90 Interface

Generic:          CALL MXYTF (A, B, C [,…])

Specific:         The specific interface names are S_MXYTF and D_MXYTF.

FORTRAN 77 Interface

Single:            CALL MXYTF (NRA, NCA, A, LDA, NRB, NCB, B, LDB, NRC, NCC, C, LDC)

Double:          The double precision name is DMXYTF.

Description

The routine MXYTF computes the real general matrix C = ABT given the real rectangular matrices A and B.

Example

Multiply a 3 ´ 4 real matrix by the transpose of a 3 ´ 4 real matrix. The output matrix will be a
3 ´ 3 real matrix.

 

      USE MXYTF_INT

      USE WRRRN_INT

 

      IMPLICIT   NONE

!                                 Declare variables

      INTEGER    NCA, NCB, NCC, NRA, NRB, NRC

      PARAMETER  (NCA=4, NCB=4, NCC=3, NRA=3, NRB=3, NRC=3)

!

      REAL       A(NRA,NCA), B(NRB,NCB), C(NRC,NCC)

!                                 Set values for A

!                                 A = ( 1.0  0.0  2.0  0.0 )

!                                     ( 3.0  4.0 -1.0  0.0 )

!                                     ( 2.0  1.0  2.0  1.0 )

!

!                                 Set values for B

!                                 B = ( -1.0  2.0  0.0  2.0 )

!                                     (  3.0  0.0 -1.0 -1.0 )

!                                     (  0.0  5.0  2.0  5.0 )

!

      DATA A/1.0, 3.0, 2.0, 0.0, 4.0, 1.0, 2.0, -1.0, 2.0, 0.0, 0.0, &

          1.0/

      DATA B/-1.0, 3.0, 0.0, 2.0, 0.0, 5.0, 0.0, -1.0, 2.0, 2.0, -1.0, &

          5.0/

!                                 Compute C = A*trans(B)

      CALL MXYTF (A, B, C)

!                                 Print results

      CALL WRRRN ('C = A*trans(B)', C)

      END

Output

 

      C = A*trans(B)
        1       2       3
1   -1.00    1.00    4.00
2    5.00   10.00   18.00
3    2.00    3.00   14.00


Visual Numerics, Inc.
Visual Numerics - Developers of IMSL and PV-WAVE
http://www.vni.com/
PHONE: 713.784.3131
FAX:713.781.9260