Multiplies a complex rectangular matrix by a complex vector.
A — Complex NRA by NCA rectangular matrix. (Input)
X — Complex vector of length NX. (Input)
Y — Complex vector of length NY containing the product A * X if IPATH is equal to 1 and the product trans(A) * X if IPATH is equal to 2. (Output)
NRA — Number of
rows of A.
(Input)
Default: NRA = size
(A,1).
NCA — Number of
columns of 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).
NX — Length of
the vector X. (Input)
NX must be
equal to NCA if
IPATH is equal
to 1. NX must be
equal to NRA if
IPATH is equal
to 2.
Default: NX = size
(X,1).
IPATH — Integer
flag. (Input)
IPATH = 1 means the
product Y =
A * X is computed. IPATH = 2 means the
product
Y =
trans(A) * X is computed, where
trans(A) is the
transpose of A.
Default: IPATH =1.
NY — Length of
the vector Y. (Input)
NY must be
equal to NRA if
IPATH is equal
to 1. NY must be
equal to NCA if
IPATH is equal
to 2.
Default: NY = size
(Y,1).
Generic: CALL MUCRV (A, X, Y [,…])
Specific: The specific interface names are S_MUCRV and D_MUCRV.
Single: CALL MUCRV (NRA, NCA, A, LDA, NX, X, IPATH, NY, Y)
Double: The double precision name is DMUCRV.
If IPATH = 1, MUCRV computes y = Ax, where A is a complex general matrix and x and y are complex vectors. If IPATH = 2, MUCRV computes y = ATx.
Multiply a 3 ´ 3 complex matrix by a complex vector of length 3. The output vector will be a complex vector of length 3.
USE MUCRV_INT
USE WRCRN_INT
IMPLICIT NONE
! Declare variables
INTEGER NCA, NRA, NX, NY
PARAMETER (NCA=3, NRA=3, NX=3, NY=3)
!
INTEGER IPATH
COMPLEX A(NRA,NCA), X(NX), Y(NY)
!
! Set values for A and X
! A = ( 1.0 + 2.0i 3.0 + 4.0i 1.0 + 0.0i )
! ( 2.0 + 1.0i 3.0 + 2.0i 0.0 - 1.0i )
! ( 2.0 - 1.0i 1.0 + 0.0i 0.0 + 1.0i )
!
! X = ( 1.0 - 1.0i 2.0 - 2.0i 0.0 - 1.0i )
!
DATA A/(1.0,2.0), (2.0,1.0), (2.0,-1.0), (3.0,4.0), (3.0,2.0), &
(1.0,0.0), (1.0,0.0), (0.0,-1.0), (0.0,1.0)/
DATA X/(1.0,-1.0), (2.0,-2.0), (0.0,-1.0)/
! Compute y = Ax
IPATH = 1
CALL MUCRV (A, X, Y)
! Print results
CALL WRCRN ('y = Ax', Y, 1, NY, 1)
END
y =
Ax
1
2
3
( 17.00, 2.00) ( 12.00, -3.00) ( 4.00, -5.00)
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |