
PROGRAM TEST

IMPLICIT NONE

C

INTEGER N

PARAMETER (N = 6)

C

INTEGER I

REAL PI, WSAVE(3 * N + 15), X(N)

C

EXTERNAL SINQB, SINQF, SINQI

INTRINSIC ACOS, SIN

C

C Initialize array X to a real odd quarterwave sequence,

C that is,it can be expanded in terms of a sine series with

C only odd wave number.

C

PI = ACOS (1.0)

DO 100, I=1, N

X(I) = 40.0 * SIN (I * PI / (2.0 * N))

100 CONTINUE

C

PRINT 1000

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

CALL SINQI (N, WSAVE)

CALL SINQF (N, X, WSAVE)

PRINT 1020

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

CALL SINQB(N, X, WSAVE)

PRINT 1030

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

C

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

1010 FORMAT (1X, 100(F6.1, 1X))

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

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

C

END

