Fourier Transforms in Maple - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Science and Engineering : fourier_in_maple

Fourier Transforms in Maple

  

Fourier transforms in Maple can be categorized as either transforms on expressions or transforms on signal data.

  

To compute the Fourier transform of an expression, use the inttrans[fourier] command. For more details on this command, see the inttrans[fourier] help page.

  

To compute the Fourier transform of signal data, the following commands are available:  

• 

SignalProcessing[DFT] : This command computes the discrete Fourier transform of an Array of signal data points. The SignalProcessing[DFT] command works for any size Array. For more information, see SignalProcessing[DFT].

• 

SignalProcessing[FFT] : Similar to the SignalProcessing[DFT] command, SignalProcessing[FFT] computes the discrete Fourier transform of an Array of signal data points. The difference between the two commands is that the SignalProcessing[FFT] command uses the fast Fourier transform algorithm. Note: SignalProcessing[FFT] requires that the size of the Array must be a power of 2, greater than 2. If the Array passed to SignalProcessing[FFT] does not meet this requirement, a warning message is displayed and the SignalProcessing[DFT] command is used instead. For more information, see SignalProcessing[FFT].

• 

DiscreteTransforms[FourierTransform] : The DiscreteTransforms[FourierTransform] provides similar functionality to that of SignalProcessing[DFT]. There are some options available inDiscreteTransforms[FourierTransform], such as padding, that are not available in SignalProcessing[DFT]. For more information, see DiscreteTransforms[FourierTransform].

• 

Note: Typically, SignalProcessing[DFT] and SignalProcessing[FFT] are slightly more efficient than DiscreteTransforms[FourierTransform].

  

 The table below provides a summarized comparison of the discrete Fourier transform commands mentioned above.

Feature

SignalProcessing[FFT]

SignalProcessing[DFT]

DiscreteTransforms[Fourier Transform]

input single rtable

yes

yes

yes

input two rtables (Re/Im)

yes

yes

yes

higher-dimensional transforms

yes

yes

yes

specify single dim for higher-dimensional transforms

no

no

yes

output single rtable

yes

yes

yes

output two rtables (Re/Im)

yes

yes

yes

padding

no

no

yes

apply transform only to initial segment

no

no

yes

in place

yes

yes

yes

specify output rtable

yes

yes

no

specify working storage

no

no

yes

size of Array: power of 2

yes

yes

yes

size of Array: other

yes (warning and then dispatch to DFT)

yes

yes

Examples

signalsintⅇt2100

signalsintⅇ1100t2

(1)

plotsignal,t=30..30

transforminttrans[fourier]signal,t,s

transform10Iπsinh50sⅇ25s225

(2)

The transform is purely imaginary:

evalcℜtransform

0

(3)

This is what the imaginary part looks like:

plotℑtransform,s=3..3

inttrans[invfourier]transform,s,t

sintⅇ1100t2

(4)

Turn the original signal into data by sampling:

dataArray1..80,i→evalfsignalt=i4|signalt=i4

data 1 .. 80 ArrayData Type: anythingStorage: rectangularOrder: Fortran_order

(5)

SignalProcessing:-SignalPlotdata

tdataSignalProcessing:-DFTdata

tdata 1 .. 80 ArrayData Type: complex8Storage: rectangularOrder: Fortran_order

(6)

The following gives a warning: FFT not applicable, using DFT instead.

tdata2SignalProcessing:-FFTdata

Warning, size of Array must be a power of two greater than two, using DFT instead and suppressing this warning for the remainder of this session

tdata2 1 .. 80 ArrayData Type: complex8Storage: rectangularOrder: Fortran_order

(7)

tdata and tdata2 are the same, up to tiny float inaccuracies:

verifytdata,tdata2,'Array''float'10,test=2

true

(8)

tdata3DiscreteTransforms:-FourierTransformdata

tdata3 1 .. 80 ArrayData Type: anythingStorage: rectangularOrder: Fortran_order

(9)

Moreover, tdata and tdata3 are the same, up to tiny float inaccuracies:

verifytdata,tdata3,'Array''float'10,test=2

true

(10)

SignalProcessing:-SignalPlot`~`[ℜ]tdata,`~`[ℑ]tdata%T,'compactplot'

originalSignalProcessing:-InverseFFTtdata

original 1 .. 80 ArrayData Type: complex8Storage: rectangularOrder: Fortran_order

(11)

verifydata,original,'Array''float'10,test=2

true

(12)

See Also

FourierTransform,efficiency

Overview of the inttrans Package

Overview of the SignalProcessing Package