FFT for real data using decimation-in-frequency algorithm. 実データに対するFFT.周波数間引きアルゴリズムを使用. このライブラリを登録した際のプログラム: Demo_FFT_IFFT

Dependents:   UIT2_SpectrumAnalyzer F746_SpectralAnalysis_NoPhoto F746_FFT_Speed F746_RealtimeSpectrumAnalyzer ... more

Revision:
3:dc123081d491
Parent:
2:9649d0e2bb4a
Child:
4:0b4975fffc90
--- a/fftReal.hpp	Fri Dec 18 10:01:28 2015 +0000
+++ b/fftReal.hpp	Mon Jan 13 08:54:18 2020 +0000
@@ -1,14 +1,15 @@
 //-------------------------------------------------------------------
-// FFT class for real data ---- Header
-//      This class can execute FFT and IFFT 
-// Copyright (c) 2015 MIKAMI, Naoki,  2015/12/18
+//  データが実数の場合の FFT class(ヘッダ)
+//
+//  2020/01/13, Copyright (c) 2020 MIKAMI, Naoki
 //-------------------------------------------------------------------
 
 #ifndef FFT_REAL_HPP
 #define FFT_REAL_HPP
 
 #include "mbed.h"
-#include <complex>  // requisite for complex
+#include <complex>      // complex で使用
+#include "Array.hpp"    // "Array_Matrix" という名前で Mbed に登録
 
 namespace Mikami
 {
@@ -17,31 +18,28 @@
     class FftReal
     {
     public:
-        // Constructor
+        // コンストラクタ
         explicit FftReal(int16_t n);
-        // Destructor
-        ~FftReal();
-        // Execute FFT
+        // FFT の実行
         void Execute(const float x[], Complex y[]);
-        // Execute IFFT
+        // IFFT の実行
         void ExecuteIfft(const Complex y[], float x[]);
 
     private:
         const int   N_FFT_;
         const float N_INV_;
-        
-        Complex*    wTable_;    // twiddle factor
-        uint16_t*   bTable_;    // for bit reversal
-        Complex*    u_;         // working area
+        Array<Complex>    wTable_;  // 回転子
+        Array<uint16_t>   bTable_;  // ビット逆順
+        Array<Complex>    u_;       // 作業領域
 
-        // Processing except for last stage
+        // 最終ステージを除いた処理
         void ExcludeLastStage();
-        // Use for reordering of rit reversal in IFFT
+        // IFFT の美と逆順の並べ替えで使用
         int Index(int n) { return (N_FFT_-bTable_[n]); }
 
-        // disallow copy constructor and assignment operator
+        // コピー・コンストラクタおよび代入演算子の禁止のため
         FftReal(const FftReal& );
         FftReal& operator=(const FftReal& );
     };
 }
-#endif  // FFT_REAL_HPP
+#endif  // FFT_REAL_HPP
\ No newline at end of file