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: F746_GUI F746_SAI_IO UIT_FFT_Real
AnalysisBase.cpp
00001 //------------------------------------------------------- 00002 // Base abstract class for spectrum analysis 00003 // 00004 // 2017/03/30, Copyright (c) 2017 MIKAMI, Naoki 00005 //------------------------------------------------------- 00006 00007 #include "AnalysisBase.hpp" 00008 00009 namespace Mikami 00010 { 00011 AnalyzerBase::AnalyzerBase(int nData, int nFft, int nUse) 00012 : N_DATA_(nData), N_FFT_(nFft), 00013 fft_(nFft), wHm_(nData-1, nUse), 00014 xData_(nUse), wData_(nUse) {} 00015 00016 void AnalyzerBase::Execute(const float xn[], float db[]) 00017 { 00018 // Differencing 00019 for (int n=0; n<N_DATA_-1; n++) 00020 xData_[n] = xn[n+1] - 0.8f*xn[n]; 00021 00022 // Windowing 00023 wHm_.Execute(xData_, wData_); 00024 00025 Analyze(wData_, db); 00026 } 00027 }
Generated on Tue Jul 12 2022 18:30:30 by
