DSPRelated.com
Forums

one dimensional FFT of a MATRIX

Started by new_student January 27, 2008
Hello every one

I am new to FFTW library and currently i am using version FFTW3.1.2.

My problem is i have a real no matrix of size 32 x 2048 and i want to
calculate one-dimensional real to complex FFT of all 32 rows(each with
2048 points) using FFTW library.

One simple approach in my mind is to use for loop for 32 times and compute
one-dimensional FFT of each row saperately using "fftw_plan
fftw_plan_dft_r2c_1d" for example.

Is there any other faster(in time) method for this problem in this FFTW
version?( just like a MATLAB fft(x) function which if x is a matrix
compute one dimensional FFT of each row or coloumn separately)


On Jan 27, 12:20 pm, "new_student" <asimbhatti...@hotmail.com> wrote:
> Hello every one > > I am new to FFTW library and currently i am using version FFTW3.1.2. > > My problem is i have a real no matrix of size 32 x 2048 and i want to > calculate one-dimensional real to complex FFT of all 32 rows(each with > 2048 points) using FFTW library. > > One simple approach in my mind is to use for loop for 32 times and compute > one-dimensional FFT of each row saperately using "fftw_plan > fftw_plan_dft_r2c_1d" for example. > > Is there any other faster(in time) method for this problem in this FFTW > version?( just like a MATLAB fft(x) function which if x is a matrix > compute one dimensional FFT of each row or coloumn separately)
Indeed, there is a fftw_plan_many_dft() function. Look in the "Advanced Interface" section of the documentation for details. The description of the function is a bit terse (IMO), so the arguments that you would need are (I think): rank = 1 howmany = 32 n[0] = 2048 inembed = outembed = NULL idist = odist = 2048 istride = ostride = 1 This should generate a plan that will do 32 DFTs of 2048 points each. The documentation states that this method is often faster than executing a single plan repeatedly for each vector. Jason