main.cpp
来自「This is a simple one dimensional Fast Fo」· C++ 代码 · 共 31 行
CPP
31 行
#include "FFT1D.h"
int main(){
FFT1D fft;
int fft_Length = 512;
int i;
double* out_re;
double* out_im;
double* in_1D_re;
double* in_1D_im;
out_re = new double[fft_Length];
out_im = new double[fft_Length];
in_1D_re = new double[fft_Length];
in_1D_im = new double[fft_Length];
for(i=0; i<=fft_Length-1; i++){
in_1D_re[i]=0.0f;
in_1D_im[i]=0.0f;
}
fft.set_in(in_1D_re, in_1D_im, fft_Length);
fft.FFT(FALSE);
for(i=0; i<=fft_Length-1; i++){
out_re[i]=fft.get_out_re()[i];
out_im[i]=fft.get_out_im()[i];
}
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?