Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Is there a fast Fourier transform in Mathematica? Although looking in the help I could not find one.

I am looking to implement the equivalent of fft in MATLAB.

share|improve this question
add comment

2 Answers 2

up vote 12 down vote accepted

Fourier[list] computes the discrete Fourier transform of list. I assume it uses the FFT when it can.

share|improve this answer
7  
Note that the normalization used by Mathematica is quite different from conventional (e.g. physics, signal processing) normalizations. Check the definition you are using, and set the option FourierParameters accordingly. –  J. M. Feb 2 '12 at 14:15
    
Is there a way to strip it out ? In Matalab syntax I need to do the following : function fs = MyFFT(fx) y = fftshift(fx); tmp = fft(y)/sqrt(length(fx)); fs = fftshift(tmp); –  500 Feb 2 '12 at 14:27
    
fftshift[vec_?VectorQ] := RotateRight[vec, Quotient[Length[vec], 2]] –  J. M. Feb 2 '12 at 14:39
8  
For reference: MATLAB's fft(stuff) is equivalent to Mathematica's Fourier[stuff, FourierParameters -> {1, -1}]. To do fft(y)/sqrt(length(y)), one doesn't need to do an explicit division, as the adjustment of FourierParameters is all that's needed: Fourier[y, FourierParameters -> {0, -1}]. –  J. M. Feb 2 '12 at 15:00
    
@J.M. Thank You very much for the explanation, well it is actually the answer to my question... –  500 Feb 3 '12 at 3:50
add comment

Fourier uses FFT when possible

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.