/*%****************************************************************************
%* All rights reserved (C). 2008 AICIA (Spain)
%* This file may not be used, copied, distributed, corrected, modified,
%* translated, transmitted or assigned without AICIA's prior authorization.
%****************************************************************************
%****************************************************************************
%* Project : DVBT2
%* Date : $Date: 2008-02-01 15:31:38 $
%* Version : $Revision: 1.1 $
%* Author(s) : SIDSA
%* Modifier(s) :
%* Description : Fast Convolution. MEX file
%*
%* This function outperformes the matlab conv function speed.
%*
%* INPUTS:
%* prhs[0] : Complex Baseband Channel Impulse Response
%* prhs[1] : Complex (IQ) Transmitted Data
%*
%* OUTPUTS:
%* prls[0] : Complex (IQ) Received Data
%***************************************************************************/
#include "mex.h"
void mexFunction(
int Nlhs , /* Number of left-hand and side args */
mxArray *Plhs[] , /* Pointer to left-hand and side args */
int Nrhs , /* Number of right-hand and side args */
const mxArray *Prhs[] /* Pointer to right-hand and side args */
)
{
int len_X ; /* Lenght of conv. input X */
int len_Y ; /* Lenght of conv. output Y */
int len_H ; /* Lenght of CIR output H */
int n ; /* Sample number */
double *X_re ; /* X input samples (real) */
double *X_im ; /* X input samples (imag.) */
double *H_re ; /* H CIR samples (real) */
double *H_im ; /* H CIR samples (imag.) */
double acc_re ; /* Convolution accumulator (real) */
double acc_im ; /* Convolution accumulator (imag.) */
int k ; /* Convolution iteration */
int lowlimit ; /* Limit to control first samples */
int uplimit ; /* Limit to control last samples */
double *y_re ; /* Convolution result (real) */
double *y_im ; /* Convolution result (imag.) */
double *k_out ; /* Convolution result (num samples) */
H_re = mxGetPr(Prhs[0]);
H_im = mxGetPi(Prhs[0]);
len_H = mxGetN(Prhs[0]);
X_re = mxGetPr(Prhs[1]);
X_im = mxGetPi(Prhs[1]);
len_X = mxGetN(Prhs[1]);
len_Y = len_X + len_H - 1;
Plhs[0] = mxCreateDoubleMatrix(1,len_Y,mxCOMPLEX);
y_re = mxGetPr(Plhs[0]);
y_im = mxGetPi(Plhs[0]);
/* Convolution loop */
for(k = 0;k < len_Y;k++)
{
acc_re = 0;
acc_im = 0;
/* To control first samples */
lowlimit = k-len_X+1;
if (lowlimit < 0) lowlimit = 0;
/* To control last samples */
uplimit = k;
if (uplimit > len_H-1) uplimit = len_H-1;
/* Complex convolution */
for (n=lowlimit;n <= uplimit;n++)
{
acc_re = acc_re + H_re[n]*X_re[k-n] - H_im[n]*X_im[k-n];
acc_im = acc_im + H_re[n]*X_im[k-n] + H_im[n]*X_re[k-n];
}
y_re[k] = acc_re;
y_im[k] = acc_im;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
DVB_T系统的matlab调制解调仿真代码 (200个子文件)
t2_ch_dvbtpscen_conv_fast.c 3KB
t2_ch_dvbtpscen_dopconv_fast.c 3KB
t2_tx_dvbt2blocod_encode.c 3KB
t2_std_dvbt2_bl_ldpc.m 54KB
TestDJBCaseCalc.m 39KB
t2_std_dvbt2_bl.m 28KB
t2_tx_dvbt2model2madapt.m 26KB
t2_cfg_dvbt2blcfg.m 22KB
t2_cfg_dvbt2blcfg_nol1.m 22KB
t2_tx_dvbt2blmadapt.m 19KB
t2_tx_dvbt2bll1gen.m 16KB
t2_tx_dvbt2bll1gen_l1coding.m 16KB
t2_tx_dvbt2midatagen.m 14KB
t2_tx_dvbt2dynvvdatagen.m 13KB
t2_tx_dvbt2blpaprtr.m 12KB
t2_rx_dvbt2blrotcondmap.m 11KB
t2_tx_dvbt2blfbuild.m 11KB
t2_std_dvbt2_bl_contloc.m 11KB
t2_rx_dvbt2blsadapt.m 9KB
t2_std_dvbt2_bl_trloc.m 9KB
t2_rx_idealche.m 8KB
t2_tx_dvbt2blmadapt_schedule.m 8KB
decodeL1post.m 8KB
t2_tx_dvbt2blfadapt.m 8KB
t2_rx_dvbt2blsadapt_decode.m 8KB
t2_tx_dvbt2blbint.m 7KB
t2_tx_dvbt2blfreqint_spermat.m 7KB
t2_rx_dvbt2blfreqdint_spermat.m 7KB
write_vv_test_point.m 7KB
t2_tx_dvbt2blp1preamb.m 7KB
t2_rx_dvbt2blfadapt.m 7KB
t2_tx_dvbt2blcint.m 7KB
t2_rx_dvbt2blbdint.m 6KB
t2_tx_dvbt2mil1gen.m 6KB
t2_rx_dvbt2blcdint.m 6KB
t2_rx_dvbt2blfextract.m 6KB
t2_tx_dvbt2blconrot.m 6KB
t2_tx_dvbt2bltxsigauxgen.m 6KB
t2_cfg_dvbt2micfg_setconfigparams.m 6KB
t2_rx_dvbt2bltdint.m 5KB
get_t2mi_packet.m 5KB
t2_tx_dvbt2bltint.m 5KB
t2_ch_dvbtpscen_getch.m 5KB
t2_ch_dvbtnoise.m 5KB
t2_tx_dvbt2blbmap.m 5KB
t2_rx_dvbt2blrx_idcodber.m 5KB
t2_rx_dvbt2blfreqdint.m 5KB
t2_tx_dvbt2blfreqint.m 4KB
t2_tx_dvbt2tsdatagen.m 4KB
t2_tx_dvbt2bll1gen_l1bitgen.m 4KB
t2_tx_dvbt2itudatagen.m 4KB
t2_tx_dvbt2blfef.m 4KB
t2_tx_dvbt2itudatagen_prbsseq_precalc.m 4KB
t2_rx_dvbt2blodcod.m 4KB
t2_tx_dvbt2blicod.m 4KB
t2_tx_dvbt2blocod.m 4KB
t2_rx_dvbt2blidcod.m 4KB
t2_rx_dvbt2blrx_sadaptber.m 4KB
t2_rx_dvbt2blrx_odcodber.m 4KB
t2_rx_dvbt2blrx_dmapber.m 4KB
t2_rx_dvbt2blrx.m 4KB
t2_rx_dvbt2blrx_bdintber.m 4KB
t2_tx_dvbt2blmadapt_inbandgenA.m 4KB
t2_tx_dvbt2blbbscramble.m 4KB
t2_tx_dvbt2dynvvdatagen_cat3packets.m 4KB
parseL1.m 4KB
t2_ch_dvbtpscen_dopconv.m 3KB
makeBasicSched.m 3KB
t2_tx_dvbt2vvdatagen.m 3KB
t2_rx_che_wr.m 3KB
t2_rx_odcod_wr.m 3KB
t2_rx_rotcondmap_wr.m 3KB
t2_tx_dvbt2rawbbfiledatagen.m 3KB
t2_tx_datagen_wr.m 3KB
t2_rx_dvbt2blmiso.m 3KB
t2_tx_dvbt2blmap.m 3KB
t2_tx_dvbt2blmiso.m 3KB
t2_rx_dvbt2blbdmap.m 3KB
t2_tx_dvbt2bldatagen.m 3KB
t2_tx_dvbt2blofdm.m 3KB
t2_rx_l1decode_wr.m 3KB
t2_rx_dvbt2bldmcells.m 3KB
t2_ch_dvbtpscen_frconv.m 3KB
t2_rx_idint_wr.m 3KB
t2_rx_sadapt_wr.m 3KB
t2_rx_fextract_wr.m 3KB
t2_ch_pscen_wr.m 3KB
t2_tx_dvbt2bltx.m 3KB
t2_rx_dvbt2blp1preamb.m 3KB
t2_tx_madapt_wr.m 3KB
decodeL1pre.m 3KB
t2_rx_miso_wr.m 3KB
t2_tx_bbscramble_wr.m 3KB
t2_ch_dvbtpscen.m 3KB
t2_tx_txsigauxgen_wr.m 3KB
l1_ldpc_decoder.m 3KB
t2_tx_paprtr_wr.m 3KB
t2_rx_dmcells_wr.m 3KB
t2_tx_conrot_wr.m 3KB
t2_tx_fadapt_wr.m 3KB
共 200 条
- 1
- 2
资源评论
u010748717
- 粉丝: 38
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于Python的图像阴影检测与去除源码(高分期末大作业项目).zip
- 基于C++/Qt实现的井字棋游戏
- 基于 Python 编程语言的 Web 框架Django
- Python和Flask实现的基于体检数据的城市公共健康可视分析系统源码+使用说明.zip
- 基于python实现的华为智慧工地-安全帽检测
- buck-boost_2023-12-16_12-12-13.eprj
- 后端开发关于数据库和API开发的介绍
- 机器学习和数据挖掘课程设计-米其林餐厅数据挖掘管理系统源码+使用文档说明.zip
- html html html展示我与ai的对化
- 数据结构课程设计-全国交通出行咨询模拟系统C语言实现源码.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功