Prints a complex rectangular matrix with integer row and column labels.
TITLE — Character
string specifying the title. (Input)
TITLE set equal to a
blank character(s) suppresses printing of the title. Use “% /” within the
title to create a new line. Long titles are automatically wrapped.
A — Complex NRA by NCA matrix to be printed. (Input)
NRA — Number of
rows. (Input)
Default: NRA = size
(A,1).
NCA — Number of
columns. (Input)
Default: NCA = size
(A,2).
LDA — Leading
dimension of A
exactly as specified in the dimension statement in the calling
program. (Input)
Default: LDA = size
(A,1).
ITRING — Triangle
option. (Input)
Default: ITRING = 0.
ITRING Action
0 Full matrix is printed.
1 Upper triangle of A is printed, including the diagonal.
2 Upper triangle of A excluding the diagonal of A is printed.
−1 Lower triangle of A is printed, including the diagonal.
−2 Lower triangle of A excluding the diagonal of A is printed.
Generic: CALL WRCRN (TITLE, A [,…])
Specific: The specific interface names are S_WRCRN and D_WRCRN for two dimensional arrays, and S_WRCRN1D and D_WRCRN1D for one dimensional arrays.
Single: CALL WRCRN (TITLE, NRA, NCA, A, LDA, ITRING)
Double: The double precision name is DWRCRN.
Routine WRCRN prints a complex rectangular matrix with the rows and columns labeled 1, 2, 3, and so on. WRCRN can restrict printing to the elements of the upper or lower triangles of matrices via the ITRING option. Generally, ITRING ≠ 0 is used with Hermitian matrices.
In addition, one-dimensional arrays can be printed as column or row vectors. For a column vector, set NRA to the length of the array, and set NCA = 1. For a row vector, set NRA = 1, and set NCA to the length of the array. In both cases, set LDA = NRA, and set ITRING = 0.
1. A single D, E, or F format is chosen automatically in order to print 4 significant digits for the largest real or imaginary part in absolute value of all the complex numbers in A. Routine WROPT can be used to change the default format.
2. Horizontal centering, a method for printing large matrices, paging, method for printing NaN (not a number), and printing a title on each page can be selected by invoking WROPT.
3. A page width of 78 characters is used. Page width and page length can be reset by invoking subroutine PGOPT .
4. Output is written to the unit specified by UMACH (see Reference Material).
This example prints all of a 3 × 4 complex matrix A with elements
USE WRCRN_INT
IMPLICIT NONE
INTEGER ITRING, LDA, NCA, NRA
PARAMETER (ITRING=0, LDA=10, NCA=4, NRA=3)
!
INTEGER I, J
COMPLEX A(LDA,NCA), CMPLX
INTRINSIC CMPLX
!
DO 20 I=1, NRA
DO 10 J=1, NCA
A(I,J) = CMPLX(I,J)
10 CONTINUE
20 CONTINUE
! Write A matrix.
CALL WRCRN ('A', A, NRA=NRA)
END
A
1
2
3
4
1 ( 1.000, 1.000) ( 1.000, 2.000) ( 1.000, 3.000) (
1.000, 4.000)
2 ( 2.000, 1.000) ( 2.000, 2.000) ( 2.000,
3.000) ( 2.000, 4.000)
3 ( 3.000, 1.000) ( 3.000,
2.000) ( 3.000, 3.000) ( 3.000, 4.000)
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |