Reputation: 5884
FFTW wrapper:
plan = fftwf.dft_1d (n, pin, pout, fftw_direction.Backward, fftw_flags.Estimate);
Matlab:
g = fft (samples, 2048)
Now I get almost correct results, but the Im
values from FFTW wrapper have different sign. If i read values from then end of g
to beggining - values will be ok.
Why FFT from Matlab is different than FFT from FFTW? Is any parameter to tell FFTW to order data?
Upvotes: 0
Views: 579
Reputation: 213170
You have the direction as backward in the first case, so it's an inverse FFT. Change it to forward:
plan = fftwf.dft_1d (n, pin, pout, fftw_direction.Forward, fftw_flags.Estimate);
Upvotes: 2