CRGRG
Copies a real general matrix.
Required Arguments
A — Matrix of order N. (Input)
B — Matrix of order N containing a copy of A. (Output)
Optional Arguments
N — Order of the matrices. (Input)
Default: N = 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).
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 CRGRG (A, B [, …])
Specific: The specific interface names are S_CRGRG and D_CRGRG.
FORTRAN 77 Interface
Single: CALL CRGRG (N, A, LDA, B, LDB)
Double: The double precision name is DCRGRG.
Description
The routine CRGRG copies the real N × N general matrix A into the real N × N general matrix B.
Example
A real 3 × 3 general matrix is copied into another real 3 × 3 general matrix.
USE CRGRG_INT
USE WRRRN_INT
IMPLICIT NONE
! Declare variables
INTEGER LDA, LDB, N
PARAMETER (LDA=3, LDB=3, N=3)
!
REAL A(LDA,N), B(LDB,N)
! Set values for A
! A = ( 0.0 1.0 1.0 )
! ( -1.0 0.0 1.0 )
! ( -1.0 -1.0 0.0 )
!
DATA A/0.0, 2* - 1.0, 1.0, 0.0, -1.0, 2*1.0, 0.0/
! Copy real matrix A to real matrix B
CALL CRGRG (A, B)
! Print results
CALL WRRRN ('B', B)
END
Output
B
1 2 3
1 0.000 1.000 1.000
2 -1.000 0.000 1.000
3 -1.000 -1.000 0.000
Published date: 03/19/2020
Last modified date: 03/19/2020