SignalProcessing
DFT
compute forward discrete Fourier transform
InverseDFT
compute inverse discrete Fourier transform
Calling Sequence
Parameters
Options
Description
Thread Safety
Examples
Compatibility
DFT(A)
DFT(A1, A2)
InverseDFT(A)
InverseDFT(A1, A2)
A
-
Array of complex numeric values; the signal
A1, A2
Arrays of real numeric values corresponding to the real and imaginary parts of the signal
container : Array or [Array, Array], predefined Array(s) for holding results
inplace : truefalse, specifies that output should overwrite input
normalization : name, type of normalization
dimension : integer or [integer] or all or "all"
The DFT(A) command computes the discrete Fourier transform (DFT) of the Array A and returns the result in an Array with datatype complex[8]. With two Array arguments, invoked as DFT(A1, A2), the command interprets A1 and A2 as giving the real and imaginary parts of the input signal, respectively, and returns the result as a sequence of two Arrays with datatype float[8]. These Arrays are the real and imaginary parts of the output signal. For this calling sequence, A1 and A2 must have the same number of elements.
The InverseDFT(A) command computes the inverse discrete Fourier transform of the Array A and returns the result in an Array with datatype complex[8]. With two Array arguments, invoked as InverseFFT(A1, A2), the command interprets A1 and A2 as giving the real and imaginary parts of the input signal, respectively, and returns the result as a sequence of two Arrays with datatype float[8]. These Arrays are the real and imaginary parts of the output signal. For this calling sequence, A1 and A2 must have the same number of elements.
Before the code performing the computation runs, the input Array(s) are converted to datatype complex[8] (for the calling sequences with A) or float[8] (for the calling sequences with A1 and A2) if they do not have that datatype already. For this reason, it is most efficient if the input Array(s) have this datatype beforehand.
Unlike the SignalProcessing:-FFT and SignalProcessing:-InverseFFT commands, the length of A is not restricted to be powers of 2. However, the FFT commands are faster for Array with lengths equal to a power of 2.
The code underlying these commands (in the Intel Integrated Performance Primitives (IPP) library, see software.intel.com/en-us/intel-ipp) does not support Arrays of dimension two or higher directly. However, when called with such an Array, these commands call the FourierTransform or InverseFourierTransform commands in the DiscreteTransforms package instead, which supports Arrays with dimension at most 5. In this case, the container option cannot be used.
For more information on Fourier transforms in Maple, including a summarized comparision of SignalProcessing[FFT], SignalProcessing[DFT], and DiscreteTransforms[FourierTransform], see Fourier Transforms in Maple.
The option normalization must be one of the following: none, symmetric or full. If normalization is none, then the FFT is computed without any normalization. If it is symmetric, then the transforms are computed using 1N as the multiplier for both the forward and inverse transforms. If it is full, then 1N is used as the multiplier, where N is the length of A.
If the container=C option is provided, and there is a single rtable argument A, then the results are put into C and C is returned. In this case, the container C must be an Array having datatype complex[8] and size equal to that of A.
If the container = [C1, C2] option is provided, and there are two rtable arguments A1 and A2, then the results are put into C1 and C2 and they are returned. In this case, C1 and C2 must be Arrays having datatype float[8] and size equal to that of A1.
With this option, no additional memory is allocated to store the result.
If the inplace or inplace=true option is provided, then A or A1 and A2 are overwritten with the results. In this case, the container option is ignored. Furthermore, if A is specified, it must have datatype complex[8], and if A1 and A2 are specified, they must have datatype float[8].
The option dimension specifies the array dimension to be transformed. If dimension = all or dimension = "all" is provided, then the array is transformed in all dimensions. The default is all.
The SignalProcessing[DFT] and SignalProcessing[InverseDFT] commands are thread-safe as of Maple 17.
For more information on thread safety, see index/threadsafe.
with⁡SignalProcessing:
with⁡plots:
N≔100:
A≔GenerateTone⁡N,1,0.1,0+GenerateTone⁡N,3,0.4,0.2:
B≔DFT⁡A
B≔
display⁡listplot⁡A,title=Signal,listplot⁡map⁡ℜ,B1..N2,title=Frequency,listplot⁡map⁡ℑ,B1..N2,title=Phase Shift
C≔InverseDFT⁡B
C≔
Norm⁡map⁡fnormal,A−C
0.
B≔DFT⁡A,normalization=full
C≔InverseDFT⁡B,normalization=full
3.90079773599999990
For the next example, we use the calling sequence where the input and output are split into real and imaginary part. The input is purely real, so we need to specify an Array of zeroes as the imaginary part.
A1≔GenerateJaehne⁡10,3
A1≔
A2≔Array⁡1..10,datatype=float8:
C1≔Array⁡1..10,datatype=float8:
C2≔Array⁡1..10,datatype=float8:
DFT⁡A1,A2,container=C1,C2
?,?
C1
C2
InverseDFT⁡C1,C2,inplace
Norm⁡map⁡fnormal,A1−C1
Norm⁡map⁡fnormal,A2−C2
N≔1001:
P≔seq⁡ithprime⁡i,i=1..N:
S≔Array⁡seq⁡Pi+1−Pi,i=1..N−1,datatype=float8:
T≔DFT⁡S:
display⁡listplot⁡S,title=Prime Differences,listplot⁡map⁡ℜ,T1..floor⁡N2,title=Frequency Space,listplot⁡map⁡ℑ,T1..floor⁡N2,title=Phase Shift
The SignalProcessing[DFT] and SignalProcessing[InverseDFT] commands were introduced in Maple 17.
For more information on Maple 17 changes, see Updates in Maple 17.
See Also
fourier_in_maple
SignalProcessing[DCT]
SignalProcessing[DWT]
SignalProcessing[FFT]
Download Help Document