[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fft2 and ifft2

From: Peter Cloetens
Subject: fft2 and ifft2
Date: Thu, 08 Feb 2007 22:11:43 +0100

We recently installed fftw in such a way that fft2 should be using fftw instead of fftpack.

The speed for real arrays got significantly improved :-) . However for complex arrays, things seem slower than before. It would seem even beneficial to calculate separately the fft2 of the real and imaginary parts:
> a=rand(2048);tic;fft2(a);toc
ans = 0.39246
> a=rand(2048);b=rand(2048);c=a+i*b;tic;fft2(c);toc
ans = 1.6244
> a=rand(2048);b=rand(2048);tic;fft2(a)+i*fft2(b);toc
ans = 0.88465

Also ifft2 for real solutions seems to be slower.
> a=rand(2048);c=fft2(a);tic;real(ifft2(c));toc
ans = 1.8613

I agree that octave can not know that c is the Fourier transform of a real function, but the user knows when he types real(ifft2(...
Is there a function that only calculates the real part of the inverse Fourier transform and that would be faster; something like real_ifft2( ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]