HP MLIB User's Guide Vol. 2 7th Ed.

Chapter 5 Fast Fourier Transforms 591
Simultaneous real-to-complex one-dimensional FFT SRCFTS/DRCFTS
l, incl, n, and incn must be such that no two points of any data sets occupy the
same elements of x. These subprograms detect this situation and return
ier = 5 if
and
where is the greatest common divisor.
Example 1 Compute the forward real-to-complex discrete Fourier transform of 256 real
data sets of length 1024. The real input data sets are stored as columns of
REAL*4 array X whose dimensions are 1027 by 256. The complex output data
sets are stored as columns of array X, with the real parts in rows 1, 3, 5, ...,
1025, and the imaginary parts in rows 2, 4, 6, ..., 1026.
INTEGER*4 L,INCL,N,INCN,IOPT,IER
REAL*4 X(1027,256)
L = 1024
INCL = 1
N = 256
INCN = 1027
IOPT = 1
CALL SRCFTS (X,L,INCL,N,INCN,IOPT,IER)
IF ( IER .NE. 0 ) THEN
handle error condition
END IF
Example 2 Compute the inverse complex-to-real discrete Fourier transform of 1024 sets of
conjugate-symmetric complex data length 256. The real and imaginary parts of
the first 129 complex data points of the input data sets are stored as the rows of
array X whose dimensions are 1025 by 258, with the real parts in columns 1, 3,
5, ..., 257, and the imaginary parts in columns 2, 4, 6, ..., 258. The real output
data sets will be stored by row in the first 256 columns of X.
INTEGER*4 L,INCL,N,INCN,IOPT,IER
REAL*4 X(1025,258)
L = 256
INCL = 1025
N = 1024
INCN = 1
IOPT = -1
CALL SRCFTS (X,L,INCL,N,INCN,IOPT,IER)
IF ( IER .NE. 0 ) THEN
handle error condition
END IF
incl n< gcd incl incn,()×
incn l 2+()< gcd incl incn,()× ,
gcd(.,.)