
PROGRAM TEST

IMPLICIT NONE

C

INTEGER M, N

PARAMETER (M = 4)

PARAMETER (N = 6)

C

INTEGER I, J

REAL PI, WSAVE(N + 15), X(M, N), XT(M, N)

C

EXTERNAL VCOSQB, VCOSQF, VCOSQI

INTRINSIC ACOS, COS

C

C Initialize the array to m real even quarterwave sequences,

C that is, they can be expanded in terms of a cosine series

C with only odd wave numbers.

C

PI = ACOS (1.0)

DO 110, J=1, M

DO 100, I=1, N

X(J,I) = 40.0 * J * COS ((I1) * PI / 2.0 / N )

100 CONTINUE

110 CONTINUE

C

CALL VCOSQI (N, WSAVE)

PRINT 1000

DO 120, J=1, M

PRINT 1010, J, (X(J, I), I = 1, N)

120 CONTINUE

CALL VCOSQF (M, N, X, XT, M, WSAVE)

PRINT 1020

DO 130, J=1, M

PRINT 1010, J, (X(J, I), I = 1, N)

130 CONTINUE

CALL VCOSQB (M, N, X, XT, M, WSAVE)

PRINT 1030

DO 140, J=1, M

PRINT 1010, J, (X(J, I), I = 1, N)

140 CONTINUE

C

1000 FORMAT (1X, 'Original Sequence: ')

1010 FORMAT(1X, ' Sequence', I2, ': ', 100(F5.1, 1X))

1020 FORMAT (1X, 'Transformed Sequence: ')

1030 FORMAT (1X, 'Recovered Sequence: ')

C

END

