test_fft.c test fftd.c check implies other coefficients should be near zero sin 2 th data [0] real = 0, imag = 0 [1] real = 0.707107, imag = 0 [2] real = 1, imag = 0 [3] real = 0.707107, imag = 0 [4] real = 1.22461e-16, imag = 0 [5] real = -0.707107, imag = 0 [6] real = -1, imag = 0 [7] real = -0.707107, imag = 0 [8] real = -2.44921e-16, imag = 0 [9] real = 0.707107, imag = 0 [10] real = 1, imag = 0 [11] real = 0.707107, imag = 0 [12] real = 3.67382e-16, imag = 0 [13] real = -0.707107, imag = 0 [14] real = -1, imag = 0 [15] real = -0.707107, imag = 0 sin 2 th FFT cos 0 th = -6.43257e-16, sin 0 th = 0 cos 1 th = -8.37856e-16, sin 1 th = 2.12744e-16 cos 2 th = -2.27161e-14, sin 2 th = -8 cos 3 th = 1.11829e-15, sin 3 th = -1.19295e-15 cos 4 th = 2.44921e-16, sin 4 th = 0 cos 5 th = -6.28444e-16, sin 5 th = -7.03108e-16 cos 6 th = 5.21393e-16, sin 6 th = -5.32907e-15 cos 7 th = 1.3277e-15, sin 7 th = -2.77099e-16 cos 8 th = 1.1331e-15, sin 8 th = 0 cos 9 th = 1.3277e-15, sin 9 th = 2.77099e-16 cos 10 th = 7.4295e-15, sin 10 th = -8.88178e-16 cos 11 th = -6.28444e-16, sin 11 th = 7.03108e-16 cos 12 th = 2.44921e-16, sin 12 th = 0 cos 13 th = 1.11829e-15, sin 13 th = 1.19295e-15 cos 14 th = 1.18262e-14, sin 14 th = 8 cos 15 th = -8.37856e-16, sin 15 th = -2.12744e-16 antialias and normalize sin 2 th FFT cos 0 th = -4.02036e-17, sin 0 th = -0 cos 1 th = -1.04732e-16, sin 1 th = -2.6593e-17 cos 2 th = -6.80621e-16, sin 2 th = 1 cos 3 th = 1.39786e-16, sin 3 th = 1.49119e-16 cos 4 th = 3.06152e-17, sin 4 th = -0 cos 5 th = -7.85555e-17, sin 5 th = 8.78885e-17 cos 6 th = 4.96931e-16, sin 6 th = 2.77556e-16 cos 7 th = 1.65962e-16, sin 7 th = 3.46373e-17 check: sin 2 th = 1.0 cos 2 th data [0] real = 1, imag = 0 [1] real = 0.707107, imag = 0 [2] real = 6.12303e-17, imag = 0 [3] real = -0.707107, imag = 0 [4] real = -1, imag = 0 [5] real = -0.707107, imag = 0 [6] real = -1.83691e-16, imag = 0 [7] real = 0.707107, imag = 0 [8] real = 1, imag = 0 [9] real = 0.707107, imag = 0 [10] real = 3.06152e-16, imag = 0 [11] real = -0.707107, imag = 0 [12] real = -1, imag = 0 [13] real = -0.707107, imag = 0 [14] real = -4.28612e-16, imag = 0 [15] real = 0.707107, imag = 0 cos 2 th FFT cos 0 th = 1.99168e-16, sin 0 th = 0 cos 1 th = -1.25191e-15, sin 1 th = 9.75936e-16 cos 2 th = 8, sin 2 th = -1.63665e-14 cos 3 th = 2.11622e-16, sin 3 th = -1.12526e-15 cos 4 th = 2.44921e-16, sin 4 th = -4.44089e-16 cos 5 th = 4.8112e-16, sin 5 th = -1.12526e-15 cos 6 th = 3.9968e-15, sin 6 th = 6.31797e-15 cos 7 th = 5.59172e-16, sin 7 th = 9.75936e-16 cos 8 th = -6.8901e-16, sin 8 th = 0 cos 9 th = 5.59172e-16, sin 9 th = -9.75936e-16 cos 10 th = -3.55271e-15, sin 10 th = 1.44071e-14 cos 11 th = 4.8112e-16, sin 11 th = 1.12526e-15 cos 12 th = 2.44921e-16, sin 12 th = 4.44089e-16 cos 13 th = 2.11622e-16, sin 13 th = 1.12526e-15 cos 14 th = 8, sin 14 th = -4.3586e-15 cos 15 th = -1.25191e-15, sin 15 th = -9.75936e-16 antialias and normalize cos 2 th FFT cos 0 th = 1.2448e-17, sin 0 th = -0 cos 1 th = -1.56489e-16, sin 1 th = -1.21992e-16 cos 2 th = 1, sin 2 th = 7.50492e-16 cos 3 th = 2.64528e-17, sin 3 th = 1.40658e-16 cos 4 th = 3.06152e-17, sin 4 th = 5.55112e-17 cos 5 th = 6.014e-17, sin 5 th = 1.40658e-16 cos 6 th = 2.77556e-17, sin 6 th = 5.0557e-16 cos 7 th = 6.98965e-17, sin 7 th = -1.21992e-16 check: cos 2 th = 1.0 1.0 + cos 2 th data [0] real = 2, imag = 0 [1] real = 1.70711, imag = 0 [2] real = 1, imag = 0 [3] real = 0.292893, imag = 0 [4] real = 0, imag = 0 [5] real = 0.292893, imag = 0 [6] real = 1, imag = 0 [7] real = 1.70711, imag = 0 [8] real = 2, imag = 0 [9] real = 1.70711, imag = 0 [10] real = 1, imag = 0 [11] real = 0.292893, imag = 0 [12] real = 0, imag = 0 [13] real = 0.292893, imag = 0 [14] real = 1, imag = 0 [15] real = 1.70711, imag = 0 cos 2 th FFT cos 0 th = 16, sin 0 th = 0 cos 1 th = -1.46719e-15, sin 1 th = 8.73365e-16 cos 2 th = 8, sin 2 th = -1.57389e-14 cos 3 th = 1.96868e-16, sin 3 th = -1.08278e-15 cos 4 th = 8.88178e-16, sin 4 th = 0 cos 5 th = 4.31169e-16, sin 5 th = -1.08278e-15 cos 6 th = 4.44089e-15, sin 6 th = 6.31841e-15 cos 7 th = 8.39153e-16, sin 7 th = 8.73365e-16 cos 8 th = -8.88178e-16, sin 8 th = 0 cos 9 th = 8.39153e-16, sin 9 th = -8.73365e-16 cos 10 th = -2.66454e-15, sin 10 th = 1.44067e-14 cos 11 th = 4.31169e-16, sin 11 th = 1.08278e-15 cos 12 th = 8.88178e-16, sin 12 th = 0 cos 13 th = 1.96868e-16, sin 13 th = 1.08278e-15 cos 14 th = 8, sin 14 th = -4.98614e-15 cos 15 th = -1.46719e-15, sin 15 th = -8.73365e-16 antialias and normalize 1.0 + cos 2 th FFT cos 0 th = 1, sin 0 th = -0 cos 1 th = -1.83399e-16, sin 1 th = -1.09171e-16 cos 2 th = 1, sin 2 th = 6.72049e-16 cos 3 th = 2.46085e-17, sin 3 th = 1.35347e-16 cos 4 th = 1.11022e-16, sin 4 th = -0 cos 5 th = 5.38961e-17, sin 5 th = 1.35347e-16 cos 6 th = 1.11022e-16, sin 6 th = 5.05516e-16 cos 7 th = 1.04894e-16, sin 7 th = -1.09171e-16 check: cos 0 th = 1.0 and cos 2 th = 1.0 square wave data, cos series [0] real = 1, imag = 0 [1] real = 1, imag = 0 [2] real = 1, imag = 0 [3] real = 1, imag = 0 [4] real = 0, imag = 0 [5] real = -1, imag = 0 [6] real = -1, imag = 0 [7] real = -1, imag = 0 [8] real = -1, imag = 0 [9] real = -1, imag = 0 [10] real = -1, imag = 0 [11] real = -1, imag = 0 [12] real = 0, imag = 0 [13] real = 1, imag = 0 [14] real = 1, imag = 0 [15] real = 1, imag = 0 square wave generate, cos series [0] real = 1.03526 [1] real = 1.02635 [2] real = 0.997308 [3] real = 0.928841 [4] real = 7.51019e-16 [5] real = -0.928841 [6] real = -0.997308 [7] real = -1.02635 [8] real = -1.03526 [9] real = -1.02635 [10] real = -0.997308 [11] real = -0.928841 [12] real = -2.43612e-15 [13] real = 0.928841 [14] real = 0.997308 [15] real = 1.02635 square wave FFT cos series cos 0 th = 0, sin 0 th = 0 cos 1 th = 10.0547, sin 1 th = -3.58659e-14 cos 2 th = 0, sin 2 th = 0 cos 3 th = -2.99321, sin 3 th = 1.22318e-14 cos 4 th = 0, sin 4 th = 0 cos 5 th = 1.33636, sin 5 th = 2.04036e-15 cos 6 th = 0, sin 6 th = 0 cos 7 th = -0.397825, sin 7 th = 4.08733e-15 cos 8 th = 0, sin 8 th = 0 cos 9 th = -0.397825, sin 9 th = 1.68148e-14 cos 10 th = 0, sin 10 th = 0 cos 11 th = 1.33636, sin 11 th = -2.63662e-15 cos 12 th = 0, sin 12 th = 0 cos 13 th = -2.99321, sin 13 th = 1.70108e-14 cos 14 th = 0, sin 14 th = 0 cos 15 th = 10.0547, sin 15 th = -1.36825e-14 antialias and normalize square wave FFT cos cos 0 th = 0, sin 0 th = -0 cos 1 th = 1.25683, sin 1 th = 1.38646e-15 cos 2 th = 0, sin 2 th = -0 cos 3 th = -0.374151, sin 3 th = 2.98688e-16 cos 4 th = 0, sin 4 th = -0 cos 5 th = 0.167045, sin 5 th = -2.92311e-16 cos 6 th = 0, sin 6 th = -0 cos 7 th = -0.0497281, sin 7 th = 7.95466e-16 check cos 1 th = 1.27, cos 3 th = -0.42, cos 5 th = 0.25 square wave inverse FFT, cos rdat 0 = 1 rdat 1 = 1 rdat 2 = 1 rdat 3 = 1 rdat 4 = 9.71993e-32 rdat 5 = -1 rdat 6 = -1 rdat 7 = -1 rdat 8 = -1 rdat 9 = -1 rdat 10 = -1 rdat 11 = -1 rdat 12 = -9.71993e-32 rdat 13 = 1 rdat 14 = 1 rdat 15 = 1 square wave data, for sin series [0] real = 0, imag = 0 [1] real = 1, imag = 0 [2] real = 1, imag = 0 [3] real = 1, imag = 0 [4] real = 1, imag = 0 [5] real = 1, imag = 0 [6] real = 1, imag = 0 [7] real = 1, imag = 0 [8] real = 0, imag = 0 [9] real = -1, imag = 0 [10] real = -1, imag = 0 [11] real = -1, imag = 0 [12] real = -1, imag = 0 [13] real = -1, imag = 0 [14] real = -1, imag = 0 [15] real = -1, imag = 0 square wave generate, using sin [0] real = 0 [1] real = 0.928841 [2] real = 0.997308 [3] real = 1.02635 [4] real = 1.03526 [5] real = 1.02635 [6] real = 0.997308 [7] real = 0.928841 [8] real = 1.50204e-15 [9] real = -0.928841 [10] real = -0.997308 [11] real = -1.02635 [12] real = -1.03526 [13] real = -1.02635 [14] real = -0.997308 [15] real = -0.928841 square wave FFT sin series cos 0 th = 0, sin 0 th = 0 cos 1 th = -3.98171e-14, sin 1 th = -10.0547 cos 2 th = 0, sin 2 th = 0 cos 3 th = -8.5949e-15, sin 3 th = -2.99321 cos 4 th = 0, sin 4 th = 0 cos 5 th = -1.07499e-15, sin 5 th = -1.33636 cos 6 th = 0, sin 6 th = 0 cos 7 th = -7.55852e-16, sin 7 th = -0.397825 cos 8 th = 0, sin 8 th = 0 cos 9 th = 1.39897e-14, sin 9 th = 0.397825 cos 10 th = 0, sin 10 th = 0 cos 11 th = 5.77587e-15, sin 11 th = 1.33636 cos 12 th = 0, sin 12 th = 0 cos 13 th = 1.3978e-14, sin 13 th = 2.99321 cos 14 th = 0, sin 14 th = 0 cos 15 th = 1.64992e-14, sin 15 th = 10.0547 antialias and normalize square wave FFT sin cos 0 th = 0, sin 0 th = -0 cos 1 th = -1.45736e-15, sin 1 th = 1.25683 cos 2 th = 0, sin 2 th = -0 cos 3 th = 3.36441e-16, sin 3 th = 0.374151 cos 4 th = 0, sin 4 th = -0 cos 5 th = 2.93805e-16, sin 5 th = 0.167045 cos 6 th = 0, sin 6 th = -0 cos 7 th = 8.27118e-16, sin 7 th = 0.0497281 check sin 1 th = 1.27, sin 3 th = 0.42, sin 5 th = 0.25 square wave inverse FFT, sin series rdat 0 = 0 rdat 1 = 1 rdat 2 = 1 rdat 3 = 1 rdat 4 = 1 rdat 5 = 1 rdat 6 = 1 rdat 7 = 1 rdat 8 = 0 rdat 9 = -1 rdat 10 = -1 rdat 11 = -1 rdat 12 = -1 rdat 13 = -1 rdat 14 = -1 rdat 15 = -1 square wave data, for sin, no zero note: cos values come in [0] real = 1, imag = 0 [1] real = 1, imag = 0 [2] real = 1, imag = 0 [3] real = 1, imag = 0 [4] real = 1, imag = 0 [5] real = 1, imag = 0 [6] real = 1, imag = 0 [7] real = 1, imag = 0 [8] real = -1, imag = 0 [9] real = -1, imag = 0 [10] real = -1, imag = 0 [11] real = -1, imag = 0 [12] real = -1, imag = 0 [13] real = -1, imag = 0 [14] real = -1, imag = 0 [15] real = -1, imag = 0 square wave FFT sin, no zero cos 0 th = 0, sin 0 th = 0 cos 1 th = 2, sin 1 th = -10.0547 cos 2 th = 0, sin 2 th = 0 cos 3 th = 2, sin 3 th = -2.99321 cos 4 th = 0, sin 4 th = 0 cos 5 th = 2, sin 5 th = -1.33636 cos 6 th = 0, sin 6 th = 0 cos 7 th = 2, sin 7 th = -0.397825 cos 8 th = 0, sin 8 th = 0 cos 9 th = 2, sin 9 th = 0.397825 cos 10 th = 0, sin 10 th = 0 cos 11 th = 2, sin 11 th = 1.33636 cos 12 th = 0, sin 12 th = 0 cos 13 th = 2, sin 13 th = 2.99321 cos 14 th = 0, sin 14 th = 0 cos 15 th = 2, sin 15 th = 10.0547 antialias and normalize square wave FFT sin cos 0 th = 0, sin 0 th = -0 cos 1 th = 0.25, sin 1 th = 1.25683 cos 2 th = 0, sin 2 th = -0 cos 3 th = 0.25, sin 3 th = 0.374151 cos 4 th = 0, sin 4 th = -0 cos 5 th = 0.25, sin 5 th = 0.167045 cos 6 th = 0, sin 6 th = -0 cos 7 th = 0.25, sin 7 th = 0.0497281 check sin 1 th = 1.27, sin 3 th = -0.42, sin 5 th = 0.25 square wave inverse FFT, sin no zero rdat 0 = 1 rdat 1 = 1 rdat 2 = 1 rdat 3 = 1 rdat 4 = 1 rdat 5 = 1 rdat 6 = 1 rdat 7 = 1 rdat 8 = -1 rdat 9 = -1 rdat 10 = -1 rdat 11 = -1 rdat 12 = -1 rdat 13 = -1 rdat 14 = -1 rdat 15 = -1 triangle wave data, cos series [0] real = 1, imag = 0 [1] real = 0.75, imag = 0 [2] real = 0.5, imag = 0 [3] real = 0.25, imag = 0 [4] real = 0, imag = 0 [5] real = -0.25, imag = 0 [6] real = -0.5, imag = 0 [7] real = -0.75, imag = 0 [8] real = -1, imag = 0 [9] real = -0.75, imag = 0 [10] real = -0.5, imag = 0 [11] real = -0.25, imag = 0 [12] real = 0, imag = 0 [13] real = 0.25, imag = 0 [14] real = 0.5, imag = 0 [15] real = 0.75, imag = 0 triangle wave generate, cos series [0] real = 0.977507 [1] real = 0.75159 [2] real = 0.501724 [3] real = 0.250988 [4] real = 8.55373e-18 [5] real = -0.250988 [6] real = -0.501724 [7] real = -0.75159 [8] real = -0.977507 [9] real = -0.75159 [10] real = -0.501724 [11] real = -0.250988 [12] real = -2.57621e-16 [13] real = 0.250988 [14] real = 0.501724 [15] real = 0.75159 triangle wave FFT, cos series cos 0 th = 0, sin 0 th = 0 cos 1 th = 6.56854, sin 1 th = -2.07964e-14 cos 2 th = 0, sin 2 th = 0 cos 3 th = 0.809957, sin 3 th = 1.68123e-15 cos 4 th = 0, sin 4 th = 0 cos 5 th = 0.361616, sin 5 th = 5.54707e-15 cos 6 th = 0, sin 6 th = 0 cos 7 th = 0.259892, sin 7 th = 3.0027e-15 cos 8 th = 0, sin 8 th = 0 cos 9 th = 0.259892, sin 9 th = 1.12708e-14 cos 10 th = 0, sin 10 th = 0 cos 11 th = 0.361616, sin 11 th = 3.11636e-15 cos 12 th = 0, sin 12 th = 0 cos 13 th = 0.809957, sin 13 th = 3.97851e-15 cos 14 th = 0, sin 14 th = 0 cos 15 th = 6.56854, sin 15 th = -7.80029e-15 antialias and normalize triangle wave FFT cos cos 0 th = 0, sin 0 th = -0 cos 1 th = 0.821067, sin 1 th = 8.12257e-16 cos 2 th = 0, sin 2 th = -0 cos 3 th = 0.101245, sin 3 th = 1.4358e-16 cos 4 th = 0, sin 4 th = -0 cos 5 th = 0.045202, sin 5 th = -1.51919e-16 cos 6 th = 0, sin 6 th = -0 cos 7 th = 0.0324864, sin 7 th = 5.16758e-16 check cos 1 th = 0.81, cos 3 th = 0.09, cos 5 th = 0.03 triangle wave data, sin series [0] real = 0, imag = 0 [1] real = 0.25, imag = 0 [2] real = 0.5, imag = 0 [3] real = 0.75, imag = 0 [4] real = 1, imag = 0 [5] real = 0.75, imag = 0 [6] real = 0.5, imag = 0 [7] real = 0.25, imag = 0 [8] real = 0, imag = 0 [9] real = -0.25, imag = 0 [10] real = -0.5, imag = 0 [11] real = -0.75, imag = 0 [12] real = -1, imag = 0 [13] real = -0.75, imag = 0 [14] real = -0.5, imag = 0 [15] real = -0.25, imag = 0 triangle wave generate, sin series [0] real = 0 [1] real = 0.250988 [2] real = 0.501724 [3] real = 0.75159 [4] real = 0.977507 [5] real = 0.75159 [6] real = 0.501724 [7] real = 0.250988 [8] real = 1.71075e-17 [9] real = -0.250988 [10] real = -0.501724 [11] real = -0.75159 [12] real = -0.977507 [13] real = -0.75159 [14] real = -0.501724 [15] real = -0.250988 triangle wave FFT cos 0 th = 0, sin 0 th = 0 cos 1 th = -2.41472e-14, sin 1 th = -6.56854 cos 2 th = 0, sin 2 th = 0 cos 3 th = 1.55193e-15, sin 3 th = 0.809957 cos 4 th = 0, sin 4 th = 0 cos 5 th = 2.31805e-15, sin 5 th = -0.361616 cos 6 th = 0, sin 6 th = 0 cos 7 th = 1.08583e-16, sin 7 th = 0.259892 cos 8 th = 0, sin 8 th = 0 cos 9 th = 8.00244e-15, sin 9 th = -0.259892 cos 10 th = 0, sin 10 th = 0 cos 11 th = 2.69641e-16, sin 11 th = 0.361616 cos 12 th = 0, sin 12 th = 0 cos 13 th = 9.02354e-16, sin 13 th = -0.809957 cos 14 th = 0, sin 14 th = 0 cos 15 th = 1.09942e-14, sin 15 th = 6.56854 antialias and normalize triangle wave FFT sin cos 0 th = 0, sin 0 th = -0 cos 1 th = -8.22062e-16, sin 1 th = 0.821067 cos 2 th = 0, sin 2 th = -0 cos 3 th = 1.53393e-16, sin 3 th = -0.101245 cos 4 th = 0, sin 4 th = -0 cos 5 th = 1.61731e-16, sin 5 th = 0.045202 cos 6 th = 0, sin 6 th = -0 cos 7 th = 5.06939e-16, sin 7 th = -0.0324864 check sin 1 th = 0.81, sin 3 th = -0.09, sin 5 th = 0.03 saw tooth wave data, sin series [0] real = 0, imag = 0 [1] real = 0.125, imag = 0 [2] real = 0.25, imag = 0 [3] real = 0.375, imag = 0 [4] real = 0.5, imag = 0 [5] real = 0.625, imag = 0 [6] real = 0.75, imag = 0 [7] real = 0.875, imag = 0 [8] real = 0, imag = 0 [9] real = -0.875, imag = 0 [10] real = -0.75, imag = 0 [11] real = -0.625, imag = 0 [12] real = -0.5, imag = 0 [13] real = -0.375, imag = 0 [14] real = -0.25, imag = 0 [15] real = -0.125, imag = 0 sawtooth wave generate, sin series [0] real = 0 [1] real = 0.109498 [2] real = 0.256583 [3] real = 0.390342 [4] real = 0.484124 [5] real = 0.610362 [6] real = 0.78811 [7] real = 0.881255 [8] real = 1.72763e-15 [9] real = -0.881255 [10] real = -0.78811 [11] real = -0.610362 [12] real = -0.484124 [13] real = -0.390342 [14] real = -0.256583 [15] real = -0.109498 saw tooth wave FFT, sin series cos 0 th = 0, sin 0 th = 0 cos 1 th = -1.99085e-14, sin 1 th = -5.02734 cos 2 th = 6.64692e-15, sin 2 th = 2.41421 cos 3 th = -4.29745e-15, sin 3 th = -1.49661 cos 4 th = 1.75099e-15, sin 4 th = 1 cos 5 th = -5.37493e-16, sin 5 th = -0.668179 cos 6 th = 7.50159e-16, sin 6 th = 0.414214 cos 7 th = -3.77926e-16, sin 7 th = -0.198912 cos 8 th = 0, sin 8 th = 0 cos 9 th = 6.99487e-15, sin 9 th = 0.198912 cos 10 th = -3.19265e-15, sin 10 th = -0.414214 cos 11 th = 2.88794e-15, sin 11 th = 0.668179 cos 12 th = -1.75099e-15, sin 12 th = -1 cos 13 th = 6.98898e-15, sin 13 th = 1.49661 cos 14 th = -4.20443e-15, sin 14 th = -2.41421 cos 15 th = 8.24961e-15, sin 15 th = 5.02734 antialias and normalize saw tooth wave FFT sin cos 0 th = 0, sin 0 th = -0 cos 1 th = -7.28682e-16, sin 1 th = 0.628417 cos 2 th = 1.52656e-16, sin 2 th = -0.301777 cos 3 th = 1.68221e-16, sin 3 th = 0.187076 cos 4 th = 0, sin 4 th = -0.125 cos 5 th = 1.46903e-16, sin 5 th = 0.0835223 cos 6 th = -1.52656e-16, sin 6 th = -0.0517767 cos 7 th = 4.13559e-16, sin 7 th = 0.024864 check sin 1 th = 0.64, sin 3 th = -0.32, sin 5 th = 0.21 set up convolution test square wave data, a , upper half zero [0] real = 1, imag = 0 [1] real = 1, imag = 0 [2] real = 1, imag = 0 [3] real = 1, imag = 0 [4] real = 0, imag = 0 [5] real = -1, imag = 0 [6] real = -1, imag = 0 [7] real = -1, imag = 0 [8] real = -1, imag = 0 [9] real = -1, imag = 0 [10] real = -1, imag = 0 [11] real = -1, imag = 0 [12] real = 0, imag = 0 [13] real = 1, imag = 0 [14] real = 1, imag = 0 [15] real = 1, imag = 0 [16] real = 0, imag = 0 [17] real = 0, imag = 0 [18] real = 0, imag = 0 [19] real = 0, imag = 0 [20] real = 0, imag = 0 [21] real = 0, imag = 0 [22] real = 0, imag = 0 [23] real = 0, imag = 0 [24] real = 0, imag = 0 [25] real = 0, imag = 0 [26] real = 0, imag = 0 [27] real = 0, imag = 0 [28] real = 0, imag = 0 [29] real = 0, imag = 0 [30] real = 0, imag = 0 [31] real = 0, imag = 0 AT FFT of sauare wave cos 0 th = 0, sin 0 th = 0 cos 1 th = 1, sin 1 th = 4.20558 cos 2 th = 10.0547, sin 2 th = -3.59086e-14 cos 3 th = 1, sin 3 th = -7.9586 cos 4 th = 0, sin 4 th = 0 cos 5 th = 1, sin 5 th = -4.51668 cos 6 th = -2.99321, sin 6 th = 1.26331e-14 cos 7 th = 1, sin 7 th = 0.504721 cos 8 th = 0, sin 8 th = 0 cos 9 th = 1, sin 9 th = 0.339936 cos 10 th = 1.33636, sin 10 th = 3.29993e-15 cos 11 th = 1, sin 11 th = -1.29042 cos 12 th = 0, sin 12 th = 0 cos 13 th = 1, sin 13 th = -0.732344 cos 14 th = -0.397825, sin 14 th = 3.66233e-15 cos 15 th = 1, sin 15 th = 0.0407965 cos 16 th = 0, sin 16 th = 0 cos 17 th = 1, sin 17 th = -0.0407965 cos 18 th = -0.397825, sin 18 th = 1.62294e-14 cos 19 th = 1, sin 19 th = 0.732344 cos 20 th = 0, sin 20 th = 0 cos 21 th = 1, sin 21 th = 1.29042 cos 22 th = 1.33636, sin 22 th = -2.7239e-15 cos 23 th = 1, sin 23 th = -0.339936 cos 24 th = 0, sin 24 th = 0 cos 25 th = 1, sin 25 th = -0.504721 cos 26 th = -2.99321, sin 26 th = 1.63792e-14 cos 27 th = 1, sin 27 th = 4.51668 cos 28 th = 0, sin 28 th = 0 cos 29 th = 1, sin 29 th = 7.9586 cos 30 th = 10.0547, sin 30 th = -1.35715e-14 cos 31 th = 1, sin 31 th = -4.20558 triangle wave data, b , upper half zero [0] real = 1, imag = 0 [1] real = 0.75, imag = 0 [2] real = 0.5, imag = 0 [3] real = 0.25, imag = 0 [4] real = 0, imag = 0 [5] real = -0.25, imag = 0 [6] real = -0.5, imag = 0 [7] real = -0.75, imag = 0 [8] real = -1, imag = 0 [9] real = -0.75, imag = 0 [10] real = -0.5, imag = 0 [11] real = -0.25, imag = 0 [12] real = 0, imag = 0 [13] real = 0.25, imag = 0 [14] real = 0.5, imag = 0 [15] real = 0.75, imag = 0 [16] real = 0, imag = 0 [17] real = 0, imag = 0 [18] real = 0, imag = 0 [19] real = 0, imag = 0 [20] real = 0, imag = 0 [21] real = 0, imag = 0 [22] real = 0, imag = 0 [23] real = 0, imag = 0 [24] real = 0, imag = 0 [25] real = 0, imag = 0 [26] real = 0, imag = 0 [27] real = 0, imag = 0 [28] real = 0, imag = 0 [29] real = 0, imag = 0 [30] real = 0, imag = 0 [31] real = 0, imag = 0 BT FFT of sauare wave cos 0 th = 0, sin 0 th = 0 cos 1 th = 1, sin 1 th = 2.85769 cos 2 th = 6.56854, sin 2 th = -2.05955e-14 cos 3 th = 1, sin 3 th = -4.77997 cos 4 th = 0, sin 4 th = 0 cos 5 th = 1, sin 5 th = -1.30835 cos 6 th = 0.809957, sin 6 th = 1.88313e-15 cos 7 th = 1, sin 7 th = -1.5291 cos 8 th = 0, sin 8 th = 0 cos 9 th = 1, sin 9 th = -0.61149 cos 10 th = 0.361616, sin 10 th = 6.12629e-15 cos 11 th = 1, sin 11 th = -0.695224 cos 12 th = 0, sin 12 th = 0 cos 13 th = 1, sin 13 th = -0.166844 cos 14 th = 0.259892, sin 14 th = 2.76244e-15 cos 15 th = 1, sin 15 th = -0.224704 cos 16 th = 0, sin 16 th = 0 cos 17 th = 1, sin 17 th = 0.224704 cos 18 th = 0.259892, sin 18 th = 1.07559e-14 cos 19 th = 1, sin 19 th = 0.166844 cos 20 th = 0, sin 20 th = 0 cos 21 th = 1, sin 21 th = 0.695224 cos 22 th = 0.361616, sin 22 th = 3.07146e-15 cos 23 th = 1, sin 23 th = 0.61149 cos 24 th = 0, sin 24 th = 0 cos 25 th = 1, sin 25 th = 1.5291 cos 26 th = 0.809957, sin 26 th = 3.71328e-15 cos 27 th = 1, sin 27 th = 1.30835 cos 28 th = 0, sin 28 th = 0 cos 29 th = 1, sin 29 th = 4.77997 cos 30 th = 6.56854, sin 30 th = -7.71703e-15 cos 31 th = 1, sin 31 th = -2.85769 convolution of a with b real[0] = 1 real[1] = 1.75 real[2] = 2.25 real[3] = 2.5 real[4] = 1.5 real[5] = -0.5 real[6] = -2.25 real[7] = -3.75 real[8] = -5 real[9] = -5.5 real[10] = -5.25 real[11] = -4.25 real[12] = -1.5 real[13] = 2.25 real[14] = 5.25 real[15] = 7.5