|
From: | Mostafa Alizadeh |
Subject: | Re: [Discuss-gnuradio] a crazy problem with GNURadio fft |
Date: | Tue, 26 Aug 2014 21:03:30 +0430 |
Thanks Sylvain,
not finding that drove me crazy (more crazy than usual); the zeroth
element must be sum(range(fftlen))=(63+0)*(64/2) = 63*32 = 2048 - 32 =
2016, like in the matlab result, yet I did not find where the data
stopped flowing... now,
sum(range(fftlen/sizeof(gr_complex)))=sum(range(8))=(7+0)*8/2=28
explains that :)
Also, Mostafa, you call your transform ifft, yet you set forward=true,
which might be a bit confusing in the future.
For the IFFT, Matlab does something different than the pure FFTW that
GNU Radio uses: it divides by fft_size, compare [1] to [2].
Greetings,
Marcus
[1]http://www.mathworks.de/de/help/matlab/ref/fft.html
[2]http://www.fftw.org/doc/The-1d-Discrete-Fourier-Transform-_0028DFT_0029.html#The-1d-Discrete-Fourier-Transform-_0028DFT_0029
> _______________________________________________
On 26.08.2014 15:36, Sylvain Munaut wrote:
>> memcpy(ifft->get_inbuf(), in, fft_size);
> fft_size * sizeof(gr_complex)
>
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Prev in Thread] | Current Thread | [Next in Thread] |