discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] a crazy problem with GNURadio fft


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] a crazy problem with GNURadio fft
Date: Tue, 26 Aug 2014 16:01:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

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




reply via email to

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