I\'m writing a simple code for complex to complex DFT in c with fftw3 library. i have written a file with input array double data so I can compare with matlab fft function. I tr
The difference between Matlab and FFTW comes with the scaling factor applied to the transform.
Whereas Matlab's FFT is normalized, the algorithm used by FFTW as described in FFTW's documentation, is not normalized. In other words, the full-circle transform using FFTW (forward followed by backward) scales the result by a factor N
.
Correspondingly, comparing the in
and rev
array shows that rev
is scaled by consistent factor of 8 (the size N
of the transform used in your example).