Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BSP_DISCO_F746NG BUTTON_GROUP LCD_DISCO_F746NG TS_DISCO_F746NG UIT_FFT_Real mbed
FFT_Analysis.hpp
00001 //------------------------------------------------------- 00002 // Class for spectrum analysis using FFT (Header) 00003 // Copyright (c) 2015 MIKAMI, Naoki, 2015/10/26 00004 //------------------------------------------------------- 00005 00006 #ifndef FFT_ANALYZER_HPP 00007 #define FFT_ANALYZER_HPP 00008 00009 #include "fftReal.hpp" 00010 #include "Hamming.hpp" 00011 00012 namespace Mikami 00013 { 00014 class FftAnalyzer 00015 { 00016 public: 00017 FftAnalyzer(int nData, int nFft); 00018 ~FftAnalyzer(); 00019 void Execute(float xn[], float db[]); 00020 00021 private: 00022 const int N_DATA_; 00023 const int N_FFT_; 00024 00025 HammingWindow hm_; 00026 FftReal fft_; 00027 00028 float* xData; // Data to be analyzed 00029 float* xFft; // Input for FFT 00030 Complex* yFft; // Output of FFT 00031 float* normY; // Powerspectrum 00032 00033 float Sqr(float x) { return x*x; } 00034 }; 00035 } 00036 00037 #endif // FFT_ANALYZER_HPP 00038
Generated on Mon Jul 18 2022 10:22:00 by
1.7.2