HP MLIB User's Guide Vol. 2 7th Ed.
Chapter 5 Fast Fourier Transforms 563
Simultaneous one-dimensional FFT SFFTS/DFFTS
Similarly, if the subscript that varies between data sets is the
l, incl, n, and incn must be such that no two points of any data sets occupy the
same elements of x and y. These subprograms detect this situation and return
ier = −5 if
and
where is the greatest common divisor.
Example 1 Compute the forward discrete Fourier transform of 256 complex data sets of
length 1024. Real and imaginary parts of data sets are stored as columns of
arrays X and Y whose dimensions are 1025 by 256.
INTEGER*4 L,INCL,N,INCN,IOPT,IER
REAL*4 X(1025,256),Y(1025,256)
L = 1024
INCL = 1
N = 256
INCN = 1025
IOPT = 1
CALL SFFTS (X,Y,L,INCL,N,INCN,IOPT,IER)
IF ( IER .NE. 0 ) THEN
handle error condition
END IF
Example 2 Compute the inverse discrete Fourier transform of 1024 complex data sets of
length 256. Real and imaginary parts of data sets are stored as rows of arrays X
and Y whose dimensions are 1025 by 256.
INTEGER*4 L,INCL,N,INCN,IOPT,IER
REAL*4 X(1025,256),Y(1025,256)
L = 256
INCL = 1025
N = 1024
INCN = 1
IOPT = -1
CALL SFFTS (X,Y,L,INCL,N,INCN,IOPT,IER)
IF ( IER .NE. 0 ) THEN
handle error condition
END IF
1st subscript, use incn = 1.
2nd subscript, use incn = ldxy.
3rd subscript, use incn = ldxy×mdxy.
incl n< gcd incl incn,()×
incn l< gcd incl incn,()×
gcd(.,.)