Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a package in R that gives -normalized- inverse FFT?

Tags:

r

fft

Has anyone written a fast Fourier transform extension for R that modifies R's native fft() function so that when you call for the inverse fast Fourier transform you don't have to divide by the length of the fast Fourier transform output? I'm doing a lot of FFTs and inverse FFTs and having to do this every time is getting annoying.

like image 495
Brash Equilibrium Avatar asked Nov 17 '11 05:11

Brash Equilibrium


People also ask

How do you do inverse FFT?

X = ifft( Y ) computes the inverse discrete Fourier transform of Y using a fast Fourier transform algorithm. X is the same size as Y . If Y is a vector, then ifft(Y) returns the inverse transform of the vector. If Y is a matrix, then ifft(Y) returns the inverse transform of each column of the matrix.

What is the difference between IFFT and FFT?

FFT (Fast Fourier Transform) is able to convert a signal from the time domain to the frequency domain. IFFT (Inverse FFT) converts a signal from the frequency domain to the time domain.

Is FFT reversible?

The transformation from the time domain to the frequency domain is reversible.

What is inverse FFT used for?

Inverse Fast Fourier transform (IDFT) is an algorithm to undoes the process of DFT. It is also known as backward Fourier transform. It converts a space or time signal to a signal of the frequency domain.


1 Answers

You could write your own:

fftinv <- function( x ) { fft( x, inverse=TRUE ) / length( x ) }
like image 181
Ari B. Friedman Avatar answered Sep 17 '22 18:09

Ari B. Friedman