資源簡介
該工程文件只包含FFT變換的演示。
該文件夾包含兩個目錄,分另為實現FFT變換的C以及C#代碼實現。
經我整理之后,現在兩個程序都采用相同的方法,并且采樣數據為8192個點。
數據的來源于b.txt文件
所以變換后的頻率圖像是一樣的,對于需要不同的代碼的朋友,各取所需要。
代碼中的注釋不是很多,相關理論說明請參考我的BLOG:http://blog.csdn.net/yin138/
編譯環境:
C版:可以使用VC6編譯,也可以使用VC2010
C#版可以在2003以上編譯環境中使用
@本工程代碼僅作為我學習FFT變換使用,如果有需要你可以在任何范圍內使用,不需要告知我。
yin138 2010-5-8

代碼片段和文件信息
//?FFT.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“FFT.h“
#include?“MainFrm.h“
#include?“FFTDoc.h“
#include?“FFTView.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CFFTApp
BEGIN_MESSAGE_MAP(CFFTApp?CWinApp)
//{{AFX_MSG_MAP(CFFTApp)
ON_COMMAND(ID_APP_ABOUT?OnAppAbout)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG_MAP
//?Standard?file?based?document?commands
ON_COMMAND(ID_FILE_NEW?CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN?CWinApp::OnFileOpen)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CFFTApp?construction
CFFTApp::CFFTApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CFFTApp?object
CFFTApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CFFTApp?initialization
BOOL?CFFTApp::InitInstance()
{
AfxEnableControlContainer();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
//?Change?the?registry?key?under?which?our?settings?are?stored.
//?TODO:?You?should?modify?this?string?to?be?something?appropriate
//?such?as?the?name?of?your?company?or?organization.
SetRegistryKey(_T(“Local?AppWizard-Generated?Applications“));
LoadStdProfileSettings();??//?Load?standard?INI?file?options?(including?MRU)
//?Register?the?application‘s?document?templates.??Document?templates
//??serve?as?the?connection?between?documents?frame?windows?and?views.
CSingleDocTemplate*?pDocTemplate;
pDocTemplate?=?new?CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CFFTDoc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CFFTView));
AddDocTemplate(pDocTemplate);
//?Parse?command?line?for?standard?shell?commands?DDE?file?open
CCommandLineInfo?cmdInfo;
ParseCommandLine(cmdInfo);
//?Dispatch?commands?specified?on?the?command?line
if?(!ProcessShellCommand(cmdInfo))
return?FALSE;
//?The?one?and?only?window?has?been?initialized?so?show?and?update?it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return?TRUE;
}
/////////////////////////////////////////////////////////////////////////////
//?CAboutDlg?dialog?used?for?App?About
class?CAboutDlg
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????570969??2006-03-28?12:37??FFT_C\b.txt
?????文件?????570969??2006-03-28?12:37??FFT_C\Debug\b.txt
?????文件?????137728??2010-05-08?22:03??FFT_C\Debug\FFT.exe
?????文件????????667??2010-05-08?21:23??FFT_C\Debug\FFT.exe.em
?????文件????????381??2010-05-08?22:02??FFT_C\Debug\FFT.exe.intermediate.manifest
?????文件??????27880??2010-01-22?09:34??FFT_C\FFT.APS
?????文件???????2145??2010-01-22?09:34??FFT_C\FFT.clw
?????文件???????4060??2002-01-01?04:08??FFT_C\FFT.cpp
?????文件???????4809??2007-09-05?15:44??FFT_C\FFT.dsp
?????文件????????529??2002-01-01?04:08??FFT_C\FFT.dsw
?????文件???????1323??2002-01-01?04:08??FFT_C\FFT.h
?????文件?????123904??2010-01-22?09:34??FFT_C\FFT.ncb
?????文件??????52736??2010-01-22?09:34??FFT_C\FFT.opt
?????文件????????240??2010-01-22?09:34??FFT_C\FFT.plg
?????文件??????10915??2007-04-02?13:08??FFT_C\FFT.rc
?????文件????????872??2010-05-08?21:07??FFT_C\FFT.sln
????..A..H.?????23552??2010-05-08?22:03??FFT_C\FFT.suo
?????文件???????4340??2002-01-01?02:43??FFT_C\FFT.txt
?????文件???????8139??2010-05-08?21:21??FFT_C\FFT.vcxproj
?????文件???????2831??2010-05-08?21:21??FFT_C\FFT.vcxproj.filters
?????文件????????143??2010-05-08?21:06??FFT_C\FFT.vcxproj.user
?????文件???????1682??2002-01-01?04:08??FFT_C\FFTDoc.cpp
?????文件???????1442??2002-01-01?04:08??FFT_C\FFTDoc.h
?????文件???????7912??2010-05-08?22:00??FFT_C\FFTView.cpp
?????文件???????2370??2010-05-08?21:26??FFT_C\FFTView.h
?????文件???????4042??2002-01-02?07:57??FFT_C\FFT_2D_Kernel.H
?????文件???????3926??2010-05-08?21:42??FFT_C\JPEG.cpp
?????文件???????1106??2010-05-08?21:23??FFT_C\JPEG.h
?????文件???????3556??2010-05-08?21:30??FFT_C\MainFrm.cpp
?????文件???????1632??2010-05-08?22:02??FFT_C\MainFrm.h
............此處省略41個文件信息
- 上一篇:二叉樹已知后序和中序遍歷求前序遍歷,C++代碼
- 下一篇:克魯斯卡爾最小生成樹算法
評論
共有 條評論