⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spec_estim.cpp

📁 《无线通信系统仿真——c++使用模型》这本书的源代码
💻 CPP
字号:
//
//  File = samp.cpp
//

#include <iostream> 
#include <fstream>

#include <complex>
#include "fft_T.h"
#include "spec_estim.h"
using std::complex;

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
template <class T>
SpectrumEstimator<T>::SpectrumEstimator(  int num_samps,
                                          int fft_len,
                                          double samp_intvl )
{
   Num_Samps = num_samps;
   Fft_Len = fft_len;
   Samp_Intvl = samp_intvl;
   Psd_Estimate = new double[Num_Samps];
   for(int i=0; i<Num_Samps; i++) Psd_Estimate[i]=0.0;
}
//=================================================================
template <class T>
void SpectrumEstimator<T>::GetEstimate(  double* psd_estimate )
{
   int i;
   for(i=0; i<Num_Samps; i++)
   {
      psd_estimate[i] = Psd_Estimate[i];
   }
   return;
}
template SpectrumEstimator<std::complex<float> >;
template SpectrumEstimator<float>;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -