Copies a real general matrix.
A — Matrix of order N. (Input)
B — Matrix of order N containing a copy of A. (Output)
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).
Generic: CALL CRGRG (A, B [,…])
Specific: The specific interface names are S_CRGRG and D_CRGRG.
Single: CALL CRGRG (N, A, LDA, B, LDB)
Double: The double precision name is DCRGRG.
The routine CRGRG copies the real N ´ N general matrix A into the real N ´ N general matrix B.
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
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
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |