|
|
|
|
// FFT.h: interface for the CFFT class.
|
|
|
|
|
//
|
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#if !defined(AFX_FFT_H__DD76BAB3_D55E_11D3_BFCD_00A00C3FB20E__INCLUDED_)
|
|
|
|
|
#define AFX_FFT_H__DD76BAB3_D55E_11D3_BFCD_00A00C3FB20E__INCLUDED_
|
|
|
|
|
|
|
|
|
|
#if _MSC_VER > 1000
|
|
|
|
|
#pragma once
|
|
|
|
|
#endif // _MSC_VER > 1000
|
|
|
|
|
class AFX_EXT_CLASS CFilter
|
|
|
|
|
{
|
|
|
|
|
double xbegin,xend;
|
|
|
|
|
public:
|
|
|
|
|
CFilter();
|
|
|
|
|
CFilter(double x1,double x2);
|
|
|
|
|
void set(double x1,double x2);
|
|
|
|
|
|
|
|
|
|
double bartly(double x);
|
|
|
|
|
double hann(double x);
|
|
|
|
|
double welch(double x);
|
|
|
|
|
double window(double x);
|
|
|
|
|
|
|
|
|
|
void draw();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class AFX_EXT_CLASS CFFT
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CFFT();
|
|
|
|
|
virtual ~CFFT();
|
|
|
|
|
|
|
|
|
|
double *pr,*pi,*fr,*fi;
|
|
|
|
|
int m_pow,num;
|
|
|
|
|
double T;
|
|
|
|
|
|
|
|
|
|
void FilterLog();
|
|
|
|
|
void UnTransform();
|
|
|
|
|
void Filter(CFFT &t);
|
|
|
|
|
void Write(char *m_output,double dt,int state=1, const char *mode="wt");
|
|
|
|
|
void ToDrawing(char *name,double w1,double w2, const char *mode="wt");
|
|
|
|
|
void Transform(double *y,int n);
|
|
|
|
|
int Create(double *m_pr,double *m_pi,int num);
|
|
|
|
|
void Wavelet(double* y, int n);
|
|
|
|
|
void UnWavelet(void);
|
|
|
|
|
|
|
|
|
|
int GetPow(int num);
|
|
|
|
|
void kcfwt(double* p, int n, int k, double* x);
|
|
|
|
|
void kbfft(double* pr,double *pi,int n,int k,double* fr,double* fi,int l,int il);
|
|
|
|
|
void Walsh(double *p,int n,double *x);
|
|
|
|
|
void Walsh(double **a,int m,int n,int IsInverse);
|
|
|
|
|
void FFT2D(double **ar,double **ai,int m,int n,int IsInverse);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // !defined(AFX_FFT_H__DD76BAB3_D55E_11D3_BFCD_00A00C3FB20E__INCLUDED_)
|