HTBasic Help
×
Menu
Index
Fftz
Dransform of a real sequence lengthened with zeros.
 
Loading        LOADSUB ALL FROM "FFT.HTS"
or LOADSUB FROM "MATHLIB.HTS"
or LOADSUB Fftz FROM "MATHLIB.HTS"
 
Usage                INTEGER Logn
REAL A(*)
COMPLEX F(*)
CALL Fftz(Logn,A(*),F(*))
 
Description                
Fftz calculates the discrete Fourier transform of the sequence in the array A lengthened with 2Logn zeros and stores the result in the array F. Logn is the base-2 log of the number of points in the sequence in A. The arrays A and F must contain at least 2Logn elements. If they have more than the required number of elements, the extra elements are ignored and unmodified. The number of elements denoted by each permitted value of Logn is shown in the table below:
 
Logn                 No. Elements (2Logn)
2                4
3                8
4                16
5                32
6                64
7                128
8                256
9                512
10                1024
11                2048
12                4096
13                8192
14                16384
 
 
Except for the lengthening of the input sequence, the values returned by Fftz have the same meaning as those returned by Fft; see the entry for Fft for an explanation of the meaning of the values returned.
 
Fftz has been provided as a separate CSUB because lengthened sequences are often used when implementing convolutions and correlations and when implementing multiple-window operations on long streams of data. Such operations often have results that are twice as long in the time or space domain as either of their inputs. This results in their Fourier transforms having twice as many frequency components as the transforms of their inputs, with the extra components halfway between the components in the transforms in the input sequences.
 
Errors                
Fftz causes an HTBasic error if its arguments are not of the types shown in the USAGE section, above, if Logn is not between 2 and 15, inclusive, or if the size of A or F is smaller than the values described above.
 
See Also
Convolve, Correlate, Fft, Filter, Rfilter