
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+1), XT(M, N + 1)

C

EXTERNAL VSINQB, VSINQF, VSINQI

INTRINSIC ACOS, SIN

C

C Initialize the array to m real odd quarterwave sequence,

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 * SIN (I * PI / (2.0 * N))

100 CONTINUE

110 CONTINUE

C

CALL VSINQI (N, WSAVE)

PRINT 1000

DO 120, J=1, M

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

120 CONTINUE

CALL VSINQF (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 VSINQB (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

