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

📄 xevlmem.cpp

📁 最大熵法实现功率谱估计
💻 CPP
字号:
#include <fstream>#include <iostream>#include <iomanip>#include "nr.h"using namespace std;// Driver for routine evlmemint main(void){        const int N=1000,M=10,NFDT=16;        int i;        DP fdt,pm;        Vec_DP cof(M),data(N);        ifstream fp("spctrl.dat");        if (fp.fail())          NR::nrerror("Data file spctrl.dat not found");        for (i=0;i<N;i++) fp >> data[i];        fp.close();        NR::memcof(data,pm,cof);        cout << "Power spectum estimate of data in spctrl.dat" << endl;        cout << "     f*delta      power" << endl;        cout << fixed << setprecision(6);        for (fdt=0.0;fdt<=0.5;fdt+=0.5/NFDT) {          cout << setw(12) << fdt;          cout << setw(13) << NR::evlmem(fdt,cof,pm) << endl;        }        return 0;}

⌨️ 快捷键说明

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