Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Performing 2D fast fourier transform in R

Tags:

r

fft

I want to know how to perform 2D fft in R. I can see the function fft only but I want to do that in 2D. Is there a function available like fft2 in matlab?

like image 840
user34790 Avatar asked Jul 19 '13 12:07

user34790


1 Answers

As pointed out in the comments, fft can handle single or multi-dimensional input. From the docs:

When z is a vector, the value computed and returned by fft is the unnormalized univariate Fourier transform of the sequence of values in z. When z contains an array, fft computes and returns the multivariate (spatial) transform.

I think this documentation is confusing the terms (since an R array can have 1, 2, or more dimensions), but what they are trying to say is fairly clear.

like image 153
Jonathan Avatar answered Oct 14 '22 12:10

Jonathan