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

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Calculus : Transforms : Fourier Transforms 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, the SignalProcessing[DFT] command is used instead. Similarly, SignalProcessing[InverseFFT] calls SignalProcessing[InverseDFT] when the passed Array does not meet this requirement. For more information, see SignalProcessing[FFT].

• 

DiscreteTransforms[FourierTransform] : The DiscreteTransforms[FourierTransform] provides similar functionality to that of SignalProcessing[DFT]. There are some options available in DiscreteTransforms[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 (dispatch to DFT)

yes

yes

Examples

signalsintexpt2100

signalsintⅇt2100

(1)

plotsignal,t=30..30

transforminttransfouriersignal,t,s

transform10Iπsinh50sⅇ25s225

(2)

The transform is purely imaginary:

evalctransform

0

(3)

This is what the imaginary part looks like:

plottransform,s=3..3

inttransinvfouriertransform,s,t

sintⅇt2100

(4)

Turn the original signal into data by sampling:

dataArray1..80,ievalfevalsignal,t=i4

data0.24724938010.47822847170.67781530550.83309820860.93427197660.97530195720.95430813820.87364336480.73966368500.56221254990.35386226640.1289739763−0.09734987013−0.3103399929−0.4965810793−0.6449045459−0.7470908727−0.7983356335−0.7974529355−0.7468109761−0.6520150601−0.5213720678−0.3651855797−0.1949415782−0.022450180910.14099098560.28535114790.40248733100.48659369320.53445627630.54550633520.52168110810.46711493210.38769495350.29052361920.18333423240.07390606951−0.03047787547−0.1234939721−0.2001341823−0.2569380786−0.2920941320−0.3054141956−0.2981943590−0.2729827805−0.2332802508−0.1832019433−0.1271290188−0.06937673750−0.013901824910.035933436080.077529021630.10914187910.12990859750.13980243880.13953538790.13041883460.11419805690.092875876680.068539834120.043205216640.01868354009−0.003517056003−0.02225629117−0.03679098198−0.04677160933−0.05221092953−0.05343083141−0.05099444295−0.04563063549−0.03815763932−0.02941158576−0.02018456742−0.01117540149−0.0029548328050.0040544553260.0095838452110.013512570590.015851709610.01672117554

(5)

SignalProcessing:-SignalPlotdata

tdataSignalProcessing:-DFTdata

tdata0.449765990214555+0.I0.505210797657416+0.0390663687494100I0.871158772341445+0.0744865266272709I1.118276056776661.60320578988416I−0.8339749012551640.664082006094420I−0.3159645805618080.123878845533608I−0.1666309855805690.0788471078261399I−0.1053520121381450.0595621316126666I−0.07240929585556200.0482794303311701I−0.05222881581212240.0407062195325426I−0.03882429156840340.0351920466279138I−0.02940821171744620.0309536152571132I−0.02251483131132250.0275667649429405I−0.01730473009676250.0247798253438997I−0.01326550649498320.0224330666732571I−0.01006842681757110.0204197230546756I−0.007493983240128060.0186654357259765I−0.005390693235827060.0171166540582818I−0.003651089856861160.0157337252108298I−0.002197117052166680.0144865880008114I−0.0009709198499760310.0133519876984611I0.00007114657962727470.0123116147660412I0.0009625191227188980.0113508269453421I0.001729164544914570.0104577505722189I0.002391491186813040.00962263465913052I0.002965708831922980.00883737750161765I0.003464811917516340.00809517494757373I0.003899300993125790.00739025361514114I0.004277719195538450.00671766684027044I0.004607055731170730.00607313531064888I0.004893052577030950.00545292250998158I0.005140439896249550.00485373469997701I0.005353117624997000.00427264091457455I0.005534296909190230.00370700693220772I0.005686610182988070.00315444171561106I0.005812197276695990.00261275145103020I0.005912772177629660.00207990135986910I0.005989675105255350.00155398186211123I0.006043910803150310.00103318002042891I0.006076178185685470.000515752070609053I0.006086888632727777.75791922889773×10−18I0.00607617818568548+0.000515752070609030I0.00604391080315033+0.00103318002042890I0.00598967510525537+0.00155398186211121I0.00591277217762971+0.00207990135986899I0.00581219727669578+0.00261275145103019I0.00568661018298803+0.00315444171561109I0.00553429690919016+0.00370700693220771I0.00535311762499700+0.00427264091457455I0.00514043989624961+0.00485373469997699I0.00489305257703101+0.00545292250998158I0.00460705573117094+0.00607313531064867I0.00427771919553838+0.00671766684027042I0.00389930099312576+0.00739025361514109I0.00346481191751632+0.00809517494757372I0.00296570883192299+0.00883737750161764I0.00239149118681302+0.00962263465913052I0.00172916454491458+0.0104577505722189I0.000962519122718887+0.0113508269453421I0.0000711465796273081+0.0123116147660412I−0.000970919849976022+0.0133519876984611I−0.00219711705216667+0.0144865880008114I−0.00365108985686119+0.0157337252108298I−0.00539069323582699+0.0171166540582817I−0.00749398324012806+0.0186654357259765I−0.0100684268175711+0.0204197230546757I−0.0132655064949831+0.0224330666732570I−0.0173047300967625+0.0247798253438997I−0.0225148313113226+0.0275667649429405I−0.0294082117174462+0.0309536152571133I−0.0388242915684034+0.0351920466279138I−0.0522288158121224+0.0407062195325426I−0.0724092958555620+0.0482794303311701I−0.105352012138145+0.0595621316126666I−0.166630985580569+0.0788471078261399I−0.315964580561808+0.123878845533608I−0.833974901255164+0.664082006094420I1.11827605677666+1.60320578988416I0.8711587723414450.0744865266272709I0.5052107976574160.0390663687494100I

(6)

The following calls the FFT command, which in turn calls the DFT command (since the size of the data is not a power of 2):

tdata2SignalProcessing:-FFTdata

tdata20.449765990214555+0.I0.505210797657416+0.0390663687494100I0.871158772341445+0.0744865266272709I1.118276056776661.60320578988416I−0.8339749012551640.664082006094420I−0.3159645805618080.123878845533608I−0.1666309855805690.0788471078261399I−0.1053520121381450.0595621316126666I−0.07240929585556200.0482794303311701I−0.05222881581212240.0407062195325426I−0.03882429156840340.0351920466279138I−0.02940821171744620.0309536152571132I−0.02251483131132250.0275667649429405I−0.01730473009676250.0247798253438997I−0.01326550649498320.0224330666732571I−0.01006842681757110.0204197230546756I−0.007493983240128060.0186654357259765I−0.005390693235827060.0171166540582818I−0.003651089856861160.0157337252108298I−0.002197117052166680.0144865880008114I−0.0009709198499760310.0133519876984611I0.00007114657962727470.0123116147660412I0.0009625191227188980.0113508269453421I0.001729164544914570.0104577505722189I0.002391491186813040.00962263465913052I0.002965708831922980.00883737750161765I0.003464811917516340.00809517494757373I0.003899300993125790.00739025361514114I0.004277719195538450.00671766684027044I0.004607055731170730.00607313531064888I0.004893052577030950.00545292250998158I0.005140439896249550.00485373469997701I0.005353117624997000.00427264091457455I0.005534296909190230.00370700693220772I0.005686610182988070.00315444171561106I0.005812197276695990.00261275145103020I0.005912772177629660.00207990135986910I0.005989675105255350.00155398186211123I0.006043910803150310.00103318002042891I0.006076178185685470.000515752070609053I0.006086888632727777.75791922889773×10−18I0.00607617818568548+0.000515752070609030I0.00604391080315033+0.00103318002042890I0.00598967510525537+0.00155398186211121I0.00591277217762971+0.00207990135986899I0.00581219727669578+0.00261275145103019I0.00568661018298803+0.00315444171561109I0.00553429690919016+0.00370700693220771I0.00535311762499700+0.00427264091457455I0.00514043989624961+0.00485373469997699I0.00489305257703101+0.00545292250998158I0.00460705573117094+0.00607313531064867I0.00427771919553838+0.00671766684027042I0.00389930099312576+0.00739025361514109I0.00346481191751632+0.00809517494757372I0.00296570883192299+0.00883737750161764I0.00239149118681302+0.00962263465913052I0.00172916454491458+0.0104577505722189I0.000962519122718887+0.0113508269453421I0.0000711465796273081+0.0123116147660412I−0.000970919849976022+0.0133519876984611I−0.00219711705216667+0.0144865880008114I−0.00365108985686119+0.0157337252108298I−0.00539069323582699+0.0171166540582817I−0.00749398324012806+0.0186654357259765I−0.0100684268175711+0.0204197230546757I−0.0132655064949831+0.0224330666732570I−0.0173047300967625+0.0247798253438997I−0.0225148313113226+0.0275667649429405I−0.0294082117174462+0.0309536152571133I−0.0388242915684034+0.0351920466279138I−0.0522288158121224+0.0407062195325426I−0.0724092958555620+0.0482794303311701I−0.105352012138145+0.0595621316126666I−0.166630985580569+0.0788471078261399I−0.315964580561808+0.123878845533608I−0.833974901255164+0.664082006094420I1.11827605677666+1.60320578988416I0.8711587723414450.0744865266272709I0.5052107976574160.0390663687494100I

(7)

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

verifytdata,tdata2,Arrayfloat10,test=2

true

(8)

tdata3DiscreteTransforms:-FourierTransformdata

tdata30.449765990214555+0.I0.505210797657416+0.0390663687494100I0.871158772341445+0.0744865266272709I1.118276056776661.60320578988416I−0.8339749012551640.664082006094420I−0.3159645805618080.123878845533608I−0.1666309855805690.0788471078261399I−0.1053520121381450.0595621316126666I−0.07240929585556200.0482794303311701I−0.05222881581212240.0407062195325426I−0.03882429156840340.0351920466279138I−0.02940821171744610.0309536152571132I−0.02251483131132250.0275667649429405I−0.01730473009676250.0247798253438998I−0.01326550649498320.0224330666732571I−0.01006842681757110.0204197230546756I−0.007493983240128060.0186654357259765I−0.005390693235827060.0171166540582817I−0.003651089856861170.0157337252108298I−0.002197117052166730.0144865880008114I−0.0009709198499759820.0133519876984611I0.00007114657962733990.0123116147660412I0.0009625191227189080.0113508269453421I0.001729164544914550.0104577505722189I0.002391491186813040.00962263465913052I0.002965708831922990.00883737750161767I0.003464811917516320.00809517494757373I0.003899300993125860.00739025361514106I0.004277719195538550.00671766684027049I0.004607055731170930.00607313531064888I0.004893052577031000.00545292250998161I0.005140439896249600.00485373469997705I0.005353117624997000.00427264091457455I0.005534296909190280.00370700693220770I0.005686610182988090.00315444171561108I0.005812197276695910.00261275145103011I0.005912772177629640.00207990135986909I0.005989675105255350.00155398186211123I0.006043910803150300.00103318002042890I0.006076178185685450.000515752070608990I0.006086888632727777.75791922889773×10−18I0.00607617818568547+0.000515752070609055I0.00604391080315032+0.00103318002042891I0.00598967510525534+0.00155398186211128I0.00591277217762972+0.00207990135986902I0.00581219727669581+0.00261275145103011I0.00568661018298806+0.00315444171561106I0.00553429690919015+0.00370700693220769I0.00535311762499700+0.00427264091457455I0.00514043989624960+0.00485373469997699I0.00489305257703106+0.00545292250998159I0.00460705573117092+0.00607313531064873I0.00427771919553838+0.00671766684027043I0.00389930099312571+0.00739025361514111I0.00346481191751630+0.00809517494757374I0.00296570883192298+0.00883737750161764I0.00239149118681302+0.00962263465913053I0.00172916454491457+0.0104577505722189I0.000962519122718887+0.0113508269453421I0.0000711465796272033+0.0123116147660412I−0.000970919849976014+0.0133519876984611I−0.00219711705216666+0.0144865880008114I−0.00365108985686119+0.0157337252108297I−0.00539069323582697+0.0171166540582817I−0.00749398324012806+0.0186654357259765I−0.0100684268175711+0.0204197230546756I−0.0132655064949831+0.0224330666732571I−0.0173047300967624+0.0247798253438996I−0.0225148313113226+0.0275667649429405I−0.0294082117174463+0.0309536152571133I−0.0388242915684034+0.0351920466279138I−0.0522288158121224+0.0407062195325426I−0.0724092958555620+0.0482794303311701I−0.105352012138145+0.0595621316126666I−0.166630985580569+0.0788471078261399I−0.315964580561808+0.123878845533608I−0.833974901255164+0.664082006094420I1.11827605677666+1.60320578988416I0.8711587723414450.0744865266272709I0.5052107976574160.0390663687494100I

(9)

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

verifytdata,tdata3,Arrayfloat10,test=2

true

(10)

SignalProcessing:-SignalPlot`~`tdata,`~`tdata%T,compactplot



originalSignalProcessing:-InverseFFTtdata

original0.2472493801000005.78880680703867×10−17I0.4782284717000004.63068439595559×10−18I0.6778153055000008.81319038029480×10−17I0.8330982086000006.51485433272886×10−17I0.9342719766000003.84932699981424×10−17I0.9753019572000004.37216581496386×10−17I0.9543081382000001.07137246075397×10−16I0.873643364800000+1.14626313118273×10−17I0.739663685000000+7.27845345235421×10−18I0.5622125499000004.18686966946647×10−17I0.353862266400000+8.63971803269712×10−17I0.1289739763000003.10136987201386×10−17I−0.0973498701300000+3.59827545992758×10−17I−0.310339992900000+1.05230391045198×10−16I−0.4965810793000003.11368558291799×10−17I−0.644904545900000+4.24943082274182×10−17I−0.747090872700000+3.35757149293384×10−17I−0.798335633500000+1.32391157403481×10−18I−0.797452935500000+5.24990660756959×10−17I−0.746810976100000+1.88718509342198×10−17I−0.6520150601000004.10772041263443×10−17I−0.521372067800000+5.06354772202176×10−17I−0.3651855797000002.63851053291697×10−17I−0.1949415782000005.03499439915058×10−17I−0.0224501809100001+4.52079327377909×10−17I0.1409909856000003.27249742329407×10−17I0.285351147900000+3.90748907061433×10−17I0.402487331000000+8.46953348541619×10−18I0.486593693200000+9.69808292010440×10−18I0.5344562763000008.93242509300831×10−17I0.5455063352000002.17628287184369×10−19I0.521681108100000+2.64823837857832×10−17I0.467114932100000+7.21282754100757×10−17I0.387694953500000+8.14606194735691×10−17I0.2905236192000003.30222440706408×10−17I0.183334232400000+1.30397865400380×10−16I0.07390606950999992.50432650283726×10−17I−0.0304778754700000+1.14628954005974×10−16I−0.123493972100000+3.96110987542138×10−17I−0.200134182300000+5.88899487371556×10−18I−0.256938078600000+2.37401753883706×10−17I−0.292094132000000+2.45784344714926×10−17I−0.3054141956000001.81901620001576×10−17I−0.2981943590000005.77214813938006×10−18I−0.272982780500000+2.58404501063965×10−18I−0.233280250800000+3.26188112107199×10−18I−0.183201943300000+4.96078486908024×10−17I−0.1271290188000001.29030009412563×10−16I−0.06937673750000001.88682391650801×10−17I−0.01390182490999994.58125235420749×10−17I0.03593343608000014.03182288885964×10−17I0.07752902163000011.02260466177041×10−16I0.1091418791000009.03005370913936×10−17I0.1299085975000001.03437407935536×10−16I0.1398024388000005.48301125806298×10−17I0.139535387900000+1.70362677499389×10−17I0.1304188346000008.18483088226964×10−17I0.1141980569000004.62524740296401×10−17I0.0928758766799999+5.42014083355333×10−18I0.06853983411999991.13457845774918×10−17I0.0432052166399999+2.44719994645066×10−17I0.01868354008999984.76067169553276×10−17I−0.003517056003000024.90874179457507×10−18I−0.0222562911700000+2.37790804659256×10−17I−0.03679098197999998.07125429997171×10−18I−0.0467716093300000+6.56860874183047×10−18I−0.0522109295300000+4.06939146588404×10−17I−0.0534308314099998+6.47766995203774×10−17I−0.0509944429499998+6.45112800847227×10−17I−0.0456306354900000+1.20150628640086×10−16I−0.0381576393200000+3.19827732144755×10−17I−0.0294115857600001+7.32752066151604×10−17I−0.02018456741999992.00493393252301×10−17I−0.0111754014900000+1.10509346747932×10−17I−0.00295483280499995+2.44829210702320×10−17I0.004054455325999995.33430418179169×10−17I0.00958384521100003+4.51135371706707×10−17I0.01351257058999996.60428873666882×10−17I0.0158517096100000+1.71611595677828×10−17I0.0167211755399999+6.25557165769816×10−17I

(11)

verifydata,original,Arrayfloat10,test=2

true

(12)

See Also

FourierTransform,efficiency

Overview of the inttrans Package

Overview of the SignalProcessing Package