|
From: | Mostafa Alizadeh |
Subject: | [Discuss-gnuradio] a crazy problem with GNURadio fft |
Date: | Tue, 26 Aug 2014 17:18:22 +0430 |
#include <iostream>
#include <gnuradio/fft/fft.h>
using namespace std;
using namespace gr;
int main()
{
int fft_size = 64;
gr::fft::fft_complex *ifft = new gr::fft::fft_complex (fft_size, true, 1);
// making complex data
gr_complex in[fft_size];
for (int i=0; i<fft_size; i++)
{
in[i] = i;
}
memcpy(ifft->get_inbuf(), in, fft_size);
ifft->execute();
cout << "output" << endl;
for (int i=0; i<fft_size; i++)
{
cout << ifft->get_outbuf()[i] << endl;
}
cout << "THE END!" << endl;
return 0;
}
(28,0)
(24.3326,-13.0209)
(14.591,-22.0217)
(2.07356,-24.4501)
(-9.13707,-20.1094)
(-15.692,-11.1259)
(-16.1531,-1.03318)
(-11.3785,6.63407)
(-4,9.65685)
(2.75122,7.8416)
(6.35844,2.87496)
(5.93264,-2.55936)
(2.38009,-5.98642)
(-2.18793,-6.14396)
(-5.4952,-3.37881)
(-6.11148,0.684235)
(-4,4)
(-0.398263,5.06997)
(2.86434,3.58162)
(4.26461,0.45671)
(3.27677,-2.67271)
(0.553035,-4.28344)
(-2.45947,-3.67857)
(-4.25578,-1.27436)
(-4,1.65685)
(-1.899,3.64105)
(0.940382,3.727)
(3.08336,1.93207)
(3.48022,-0.795649)
(1.9727,-3.06732)
(-0.646391,-3.74757)
(-3.04078,-2.51227)
(-4,0)
(-3.04078,2.51227)
(-0.646391,3.74757)
(1.9727,3.06732)
(3.48022,0.795649)
(3.08336,-1.93207)
(0.940382,-3.727)
(-1.899,-3.64105)
(-4,-1.65685)
(-4.25578,1.27436)
(-2.45947,3.67857)
(0.553035,4.28344)
(3.27677,2.67271)
(4.26461,-0.45671)
(2.86434,-3.58162)
(-0.398263,-5.06997)
(-4,-4)
(-6.11148,-0.684235)
(-5.4952,3.37881)
(-2.18793,6.14396)
(2.38009,5.98642)
(5.93264,2.55936)
(6.35844,-2.87496)
(2.75122,-7.8416)
(-4,-9.65685)
(-11.3785,-6.63407)
(-16.1531,1.03318)
(-15.692,11.1259)
(-9.13707,20.1094)
(2.07356,24.4501)
(14.591,22.0217)
(24.3326,13.0209)
[Prev in Thread] | Current Thread | [Next in Thread] |