>vivekv80 wrote:
>>> On Nov 9, 7:48 am, "vivekv80" <vivek_...@yahoo.com> wrote:
>>>> 1.I used fftw_plan_dft_2d to compute the FFT for a double array of
size
>> nx
>>>> by ny. the FFT values match the Matlab values. I also used
>>>> fftw_plan_dft_2d(..,..,..,..,fftw_backward, fftw_estimate) to
compute
>> the
>>>> IFFT. This also did not provide the desired results.
>>> Matlab's ifft differs from FFTW's fftw_backward by a scale factor of
1/
>>> N (N = # points = nx * ny).
>>>
>>> Regards,
>>> Steven G. Johnson
>>>
>>>
>> Well as per Matlab's reference manual: I think I need to convert my
Has someone worked on a C implementation of the conjugate symmetric
conversion of the coefficients?? This way the coefficients match the
values obtained by doing a IFFT(..., Symmetric) in Matlab
Vivek
Reply by Fokko Beekhof●November 11, 20072007-11-11
vivekv80 wrote:
>> On Nov 9, 7:48 am, "vivekv80" <vivek_...@yahoo.com> wrote:
>>> 1.I used fftw_plan_dft_2d to compute the FFT for a double array of size
> nx
>>> by ny. the FFT values match the Matlab values. I also used
>>> fftw_plan_dft_2d(..,..,..,..,fftw_backward, fftw_estimate) to compute
> the
>>> IFFT. This also did not provide the desired results.
>> Matlab's ifft differs from FFTW's fftw_backward by a scale factor of 1/
>> N (N = # points = nx * ny).
>>
>> Regards,
>> Steven G. Johnson
>>
>>
> Well as per Matlab's reference manual: I think I need to convert my FFT
> coeffs into conjugate symmetric before I can pass them to the FFTW
> library. Can someone provide pointers??
>On Nov 9, 7:48 am, "vivekv80" <vivek_...@yahoo.com> wrote:
>> 1.I used fftw_plan_dft_2d to compute the FFT for a double array of size
nx
>> by ny. the FFT values match the Matlab values. I also used
>> fftw_plan_dft_2d(..,..,..,..,fftw_backward, fftw_estimate) to compute
the
>> IFFT. This also did not provide the desired results.
>
>Matlab's ifft differs from FFTW's fftw_backward by a scale factor of 1/
>N (N = # points = nx * ny).
>
>Regards,
>Steven G. Johnson
>
>
Well as per Matlab's reference manual: I think I need to convert my FFT
coeffs into conjugate symmetric before I can pass them to the FFTW
library. Can someone provide pointers??
Reply by Steven G. Johnson●November 9, 20072007-11-09
On Nov 9, 7:48 am, "vivekv80" <vivek_...@yahoo.com> wrote:
> 1.I used fftw_plan_dft_2d to compute the FFT for a double array of size nx
> by ny. the FFT values match the Matlab values. I also used
> fftw_plan_dft_2d(..,..,..,..,fftw_backward, fftw_estimate) to compute the
> IFFT. This also did not provide the desired results.
Matlab's ifft differs from FFTW's fftw_backward by a scale factor of 1/
N (N = # points = nx * ny).
Regards,
Steven G. Johnson
Reply by vivekv80●November 9, 20072007-11-09
Hi,
I am trying to convert a FFT and IFFT Matlab code to C using the fftw
libraries. Hoiwever, I am stuck at a particular step:
The Matlab command is: G = ifftn(P21,'symmetric');
ow do I convert this statement to C using the fftw library. I have tried
the following steps:
1.I used fftw_plan_dft_2d to compute the FFT for a double array of size nx
by ny. the FFT values match the Matlab values. I also used
fftw_plan_dft_2d(..,..,..,..,fftw_backward, fftw_estimate) to compute the
IFFT. This also did not provide the desired results.
2. I then thought of using r2c and a c2r IFFT. This also gives me wrong
results.
Can somebody suggest an alternative??
Thanks in advance,
Vivek