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

📄 fft.h

📁 基2FFT
💻 H
字号:
#ifndef __FFT_H__
#define __FFT_H__

/**
 *  Pi for fft, float type.
 */
#define PI 3.14159265358979323846

/*  Complex type.
 */
typedef struct {
    float rex, imx;
} Complex;

/**
 *  Decimation-in-Time Complex FFT Algorithm with Radix-2.
 *  Note:
 *    L   : exponent value of 2, N = 2^L.
 *    cin : input complex array.
 *    cout: output complex array.
 */
void cfftr2( const int L, 
             const Complex *cin, Complex *cout);
/**
 *  in reverse FFT.
 */
void cifftr2(const int L,
             const Complex *cin, Complex *cout);
/**
 *  DFT Algorithm, with arbitrary N point.
 *  Note: slow but sample, useful in verify other FFT algorithm.
 */
void dft(const int N, 
         const Complex cin[], Complex cout[]);

/**
 *  Bit reverse sort, use reverse addition.
 */
void revsort(const int N, 
             const Complex cin[], Complex cout[]);

/**
 *  Calculate the module and Normalize by LEVER.
 */
void module(const Complex cin[], 
            float pout[], const int N, const int LEVER);

#endif //__FFT_H__

⌨️ 快捷键说明

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