NAME rfftb - compute a periodic sequence from its Fourier coeffi- cients. The xFFT operations are unnormalized, so a call of xFFTF followed by a call of xFFTB will multiply the input sequence by N. The VxFFT operations are normalized, so a call of VxFFTF followed by a call of VxFFTB will return the original sequence. SYNOPSIS SUBROUTINE RFFTB (N, RX, RWSAVE) SUBROUTINE DFFTB (N, DX, DWSAVE) SUBROUTINE CFFTB (N, RX, RWSAVE) SUBROUTINE ZFFTB (N, DX, DWSAVE) SUBROUTINE VRFFTB (M, N, RX, RXT, MDIMX, RWSAVE) SUBROUTINE VDFFTB (M, N, DX, DXT, MDIMX, DWSAVE) #include <sunperf.h> void rfftb (int n, float *r, float *wsave); void dfftb (int n, double *r, double *wsave); void cfftb (int n, complex *cc, complex *wsave); void zfftb (int n, doublecomplex *zc, doublecomplex *wsave); void vrfftb(int m, int n, float *r, int mdimr, float *wsave); void vdfftb(int m, int n, double *r, int mdimr, double *wsave); ARGUMENTS M (For vector operations only.) The number of sequences to be transformed. M >= 0. N Length of the sequence to be transformed. These subroutines are most efficient when N is a product of small primes. N >= 0. xX On entry, an array of length N containing the sequence to be transformed. For VxFFTF, a real two-dimensional array xX(M,N) whose rows contain the sequences to be transformed. xXT (For vector operations only.) A real two-dimensional work array with dimensions of (MDIMX x N). MDIMX (For vector operations only.) Leading dimension of the arrays xX and xXT as specified in a dimension or type statement. MDIMX >= M. xWSAVE On entry, an array with dimension for scalar sub- routines of at least (2 * N + 15) for real inputs or (4 * N + 15) for complex inputs. For vector subroutines, the dimension is at least (N+15). The array must have been initialized by xFFTI or VxFFTI. SAMPLE PROGRAM PROGRAM TEST IMPLICIT NONE C INTEGER N PARAMETER (N = 4) C INTEGER I REAL PI, WSAVE(4 * N + 15), X, Y COMPLEX C(N) C EXTERNAL CFFTB, CFFTF, CFFTI INTRINSIC ACOS, CMPLX, COS, SIN C C Initialize the array C to a complex sequence. C PI = ACOS (-1.0) DO 100, I=1, N X = SIN ((I - 1.0) * 2.0 * PI / N) Y = COS ((I - 1.0) * 2.0 * PI / N) C(I) = CMPLX (X, Y) 100 CONTINUE C PRINT 1000 PRINT 1010, (C(I), I = 1, N) CALL CFFTI (N, WSAVE) CALL CFFTF (N, C, WSAVE) PRINT 1020 PRINT 1010, (C(I), I = 1, N) CALL CFFTB (N, C, WSAVE) PRINT 1030 PRINT 1010, (C(I), I = 1, N) C 1000 FORMAT (1X, 'Original Sequence:') 1010 FORMAT (1X, 100(F4.1' +',F4.1,'i ')) 1020 FORMAT (1X, 'Transformed Sequence:') 1030 FORMAT (1X, 'Recovered Sequence:') C END SAMPLE OUTPUT Original Sequence: 0.0 + 1.0i 1.0 + 0.0i 0.0 +-1.0i -1.0 + 0.0i Transformed Sequence: 0.0 + 0.0i 0.0 + 0.0i 0.0 + 0.0i 0.0 + 4.0i Recovered Sequence: 0.0 + 4.0i 4.0 + 0.0i 0.0 +-4.0i -4.0 + 0.0i
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |