DFT - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


SignalProcessing

  

DFT

  

compute forward discrete Fourier transform

  

InverseDFT

  

compute inverse discrete Fourier transform

 

Calling Sequence

Parameters

Options

Description

Thread Safety

Examples

Compatibility

Calling Sequence

DFT(A)

DFT(A1, A2)

InverseDFT(A)

InverseDFT(A1, A2)

Parameters

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

Options

• 

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"

Description

• 

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.

Thread Safety

• 

The SignalProcessing[DFT] and SignalProcessing[InverseDFT] commands are thread-safe as of Maple 17.

• 

For more information on thread safety, see index/threadsafe.

Examples

withSignalProcessing:

withplots:

N100:

AGenerateToneN,1,0.1,0+GenerateToneN,3,0.4,0.2:

BDFTA

B

(1)

displaylistplotA,title=Signal,listplotmap,B1..N2,title=Frequency,listplotmap,B1..N2,title=Phase Shift

CInverseDFTB

C

(2)

Normmapfnormal,AC

0.

(3)

BDFTA,normalization=full

B

(4)

CInverseDFTB,normalization=full

C

(5)

Normmapfnormal,AC

3.90079773599999990

(6)

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.

A1GenerateJaehne10,3

A1

(7)

A2Array1..10,datatype=float8:

C1Array1..10,datatype=float8:

C2Array1..10,datatype=float8:

DFTA1,A2,container=C1,C2

?,?

(8)

C1

(9)

C2

(10)

InverseDFTC1,C2,inplace

?,?

(11)

C1

(12)

C2

(13)

Normmapfnormal,A1C1

0.

(14)

Normmapfnormal,A2C2

0.

(15)

N1001:

Pseqithprimei,i=1..N:

SArrayseqPi+1Pi,i=1..N1,datatype=float8:

TDFTS:

displaylistplotS,title=Prime Differences,listplotmap,T1..floorN2,title=Frequency Space,listplotmap,T1..floorN2,title=Phase Shift

Compatibility

• 

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]