资源简介
用C++实现OFDM,有音频输入,调制,IFFT,加循环前缀,FFT,去循环前缀,解调,判决等步骤。

代码片段和文件信息
// OFDM.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “OFDM.h“
#include “OFDMDlg.h“
#include“math.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// COFDMApp
BEGIN_MESSAGE_MAP(COFDMApp CWinApp)
//{{AFX_MSG_MAP(COFDMApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// COFDMApp construction
COFDMApp::COFDMApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only COFDMApp object
COFDMApp theApp;
/////////////////////////////////////////////////////////////////////////////
// COFDMApp initialization
BOOL COFDMApp::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
COFDMDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed return FALSE so that we exit the
// application rather than start the application‘s message pump.
return FALSE;
}
Complex::Complex()
{
real=0;
imag=0;
}
Complex Complex::operator+(Complex c)
{
Complex tmp;
tmp.real=real+c.real;
tmp.imag=c.imag+c.imag;
return tmp;
}
Complex Complex::operator-(Complex c)
{
Complex tmp;
tmp.real=real-c.real;
tmp.imag=imag-c.imag;
return tmp;
}
Complex Complex::operator*(Complex c)
{
Complex tmp;
tmp.real=real*c.real-imag*c.imag;
tmp.imag=imag*c.real+real*c.imag;
return tmp;
}
void DFT(double *frdouble *fidouble *trdouble *tiint N)
{
for(int i=0;i {
tr[i]=ti[i]=0;
for(int j=0;j {
double p=-2*PI*i*j/N;
tr[i]+=fr[j]*cos(p)-fi[j]*sin(p);
ti[i]+=fr[j]*sin(p)+fi[j]*cos(p);
}
// tr[i]/=N;
// ti[i]/=N;
}
}
void IDFT(int *frint *fidouble *trdouble *tiint N)
{
for(int i=0;i {
tr[i]=ti[i]=0;
for(int j=0;j {
double p=2*PI*i*j/N;
tr[i]+=fr[j]*cos(p)-fi[j]*sin(p);
ti[i]+=fr[j]*sin(p)+fi[j
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 192549 2010-07-01 16:08 C++实现OFDM\Debug\522.exe
文件 236968 2010-07-01 16:08 C++实现OFDM\Debug\522.ilk
文件 5668 2010-07-01 16:08 C++实现OFDM\Debug\522.obj
文件 244376 2010-07-01 16:06 C++实现OFDM\Debug\522.pch
文件 500736 2010-07-01 16:08 C++实现OFDM\Debug\522.pdb
文件 196644 2010-07-01 15:37 C++实现OFDM\Debug\56.exe
文件 228276 2010-07-01 15:37 C++实现OFDM\Debug\56.ilk
文件 5500 2010-07-01 15:37 C++实现OFDM\Debug\56.obj
文件 244376 2010-07-01 15:37 C++实现OFDM\Debug\56.pch
文件 386048 2010-07-01 15:37 C++实现OFDM\Debug\56.pdb
文件 180264 2010-06-30 14:45 C++实现OFDM\Debug\global.exe
文件 213676 2010-06-30 14:45 C++实现OFDM\Debug\global.ilk
文件 6228 2010-06-30 14:45 C++实现OFDM\Debug\global.obj
文件 244376 2010-06-30 14:45 C++实现OFDM\Debug\global.pch
文件 377856 2010-06-30 14:45 C++实现OFDM\Debug\global.pdb
文件 192554 2010-06-27 15:22 C++实现OFDM\Debug\lingxing.exe
文件 234372 2010-06-27 15:22 C++实现OFDM\Debug\lingxing.ilk
文件 5538 2010-06-27 15:22 C++实现OFDM\Debug\lingxing.obj
文件 244376 2010-06-27 15:21 C++实现OFDM\Debug\lingxing.pch
文件 500736 2010-06-27 15:22 C++实现OFDM\Debug\lingxing.pdb
文件 200740 2010-06-29 15:37 C++实现OFDM\Debug\pi.exe
文件 228744 2010-06-29 15:37 C++实现OFDM\Debug\pi.ilk
文件 5748 2010-06-29 15:37 C++实现OFDM\Debug\pi.obj
文件 244376 2010-06-29 15:27 C++实现OFDM\Debug\pi.pch
文件 492544 2010-06-29 15:37 C++实现OFDM\Debug\pi.pdb
文件 192551 2010-06-25 20:11 C++实现OFDM\Debug\qiuhe.exe
文件 235536 2010-06-25 20:11 C++实现OFDM\Debug\qiuhe.ilk
文件 5463 2010-06-25 20:11 C++实现OFDM\Debug\qiuhe.obj
文件 244376 2010-06-25 19:50 C++实现OFDM\Debug\qiuhe.pch
文件 500736 2010-06-25 20:11 C++实现OFDM\Debug\qiuhe.pdb
............此处省略78个文件信息
相关资源
- 国际象棋的qt源代码
- C++中头文件与源文件的作用详解
- C++多线程网络编程Socket
- VC++ 多线程文件读写操作
- 利用C++哈希表的方法实现电话号码查
- 移木块游戏,可以自编自玩,vc6.0编写
- C++纯文字DOS超小RPG游戏
- VC++MFC小游戏实例教程(实例)+MFC类库
- 连铸温度场计算程序(C++)
- 6自由度机器人运动学正反解C++程序
- Em算法(使用C++编写)
- libstdc++-4.4.7-4.el6.i686.rpm
- VC++实现CMD命令执行与获得返回信息
- 白话C++(全)
- C++标准库第1、2
- 大数类c++大数类
- C++语言编写串口调试助手
- c++素数筛选法
- C++ mqtt 用法
- 商品库存管理系统 C++ MFC
- c++ 多功能计算器
- C++17 In Detail
- 嵌入式QtC++编程课件
- 颜色识别形状识别STM103嵌入式代码
- c++ 邮件多附件群发
- c++ 透明代理(hookproxy)
- mfc 调用redis
- FTP客户端源码(c++)
- c++ 画图(14Qt-XPS)
- c++多边形交并差运算
评论
共有 条评论