CRRCR
Copies a real rectangular matrix to a complex rectangular matrix.
Required Arguments
A — Real NRA by NCA rectangular matrix. (Input)
B — Complex NRB by NCB rectangular matrix containing a copy of A. (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)
It must be the same as NRA.
Default: NRB = SIZE (B,1).
NCB — Number of columns in B. (Input)
It 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).
FORTRAN 90 Interface
Generic: CALL CRRCR (A, B [])
Specific: The specific interface names are S_CRRCR and D_CRRCR.
FORTRAN 77 Interface
Single: CALL CRRCR (NRA, NCA, A, LDA, NRB, NCB, B, LDB)
Double: The double precision name is DCRRCR.
Description
The routine CRRCR copies a real rectangular matrix to a complex rectangular matrix.
Example
A 3 × 2 real matrix is copied to a 3 × 2 complex matrix.
 
USE CRRCR_INT
USE WRCRN_INT
 
IMPLICIT NONE
! Declare variables
INTEGER LDA, LDB, NCA, NCB, NRA, NRB
PARAMETER (LDA=3, LDB=3, NCA=2, NCB=2, NRA=3, NRB=3)
!
REAL A(LDA,NCA)
COMPLEX B(LDB,NCB)
! Set values for A
! A = ( 1.0 4.0 )
! ( 2.0 5.0 )
! ( 3.0 6.0 )
!
DATA A/1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
! Convert real A to complex B
CALL CRRCR (A, B)
! Print results
CALL WRCRN ('B', B)
END
Output
 
B
1 2
1 ( 1.000, 0.000) ( 4.000, 0.000)
2 ( 2.000, 0.000) ( 5.000, 0.000)
3 ( 3.000, 0.000) ( 6.000, 0.000)