Tell me more ×
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
4  
That's funny. I type fft in help, and the entry for Fourier[] is the very first result I get. Hmm... – J. M. Feb 2 '12 at 14:17
I'm curious as to why someone down voted this question. I'm a newbie here so I'm unfamiliar with all of the rules and what's considered to be good practice (or bad practice), but this seems like a reasonable question to me. – David Skulsky Feb 2 '12 at 14:36
4  
@David Probably down-voted due poster to not having seriously checked the standard documentation before posting. – Daniel Lichtblau Feb 2 '12 at 14:41
6  
@500 In a Mathematica session use menus at top to navigate to Help > Documentation Center. This is the standard way to get to the documentation. Now in the search window type "fft" (no quotes) of "Fourier transform" (or perhaps "discrete Fourier transform" to be more direct about what you want). In any of these cases you will get a substantial list of results. All of them have relevant items at or very near the top. – Daniel Lichtblau Feb 2 '12 at 14:52
1  
in addition to opening the documentation center in an input cell you can type ?*Fourier* where * are wildcards. Mma capitalizes so you might want to even try ?*ourier*. You will get a list of possibles returned with direct links to their documentation. – Mike Honeychurch Feb 2 '12 at 21:53
show 3 more comments

2 Answers

up vote 7 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
2  
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
@500 have you looked at RotateLeft and friends? working out how to do what you want in mma should be around 10^6 times easier than understanding FFT... – acl Feb 2 '12 at 14:29
@500: I'm afraid I don't understand your question (nor do I understand your example and I don't have access to MATLAB right now to try it out). – David Skulsky Feb 2 '12 at 14:31
3  
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
show 2 more comments

Fourier uses FFT when possible

share|improve this answer

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.