# What is the correct inverse function of the Matlab function fft? [closed]

I used the Matlab function fft but I am not sure which function is the correct inverse to go back to the time domain.

• i think it's ifft(). – robert bristow-johnson Jan 23 '15 at 1:37
• @robertbristow-johnson: I would certainly upvote this gem if you made it an answer! – Matt L. Jan 23 '15 at 7:49
• you may also need to consider the real part of the ifft() for some situations if the imaginary part contains epsilon level residuals, provided that you know a-priori about the realness of the time domain signal. – Fat32 Jan 23 '15 at 9:36
• Hello @MWijnand, welcome to DSP.SE. To be on-topic here, questions involving MATLAB have to contain mostly signal processing content--not just be about MATLAB itself. – datageist Jan 25 '15 at 3:55
• @datageist Excuse me, this question was indeed for Stack Overflow. – Karlo Jan 26 '15 at 12:40

• The DFT is never implemented directly when the function fft() is called. There are many special algorithms implemented for all possible FFT lengths. Some are slower (e.g. for prime lengths) and some are faster (e.g. powers of 2), but all are faster than a direct implementation of the DFT. – Matt L. Jan 23 '15 at 10:03