energyextract.rar

  • PUDN用户
    了解作者
  • Visual C++
    开发工具
  • 1KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 3
    下载次数
  • 2009-11-26 22:47
    上传日期
to perform the energy extraction after the orthogonal transforming
energyextract.rar
  • energy extract.c
    3.6KB
内容介绍
/* ******************************************************************************** filename: energy extract.c abstract: to perform the energy extraction after the orthogonal transforming reference: the paper writed by 樊祥宁 author: Shen Ke version: v1.0 2007.11.15 ********************************************************************************* */ /* ******************************************************************************** include files ******************************************************************************** */ #include "estimation.h" //#include "function.h" /* ********************************************************** function definition ********************************************************** */ /* ****************************************************************** functionname: SimpleExtract_DFT description: the simply extract the paths centralize the energy after the DFT in the time domain input: data: the channel estimated after DFT to the time domain len: the length of the symbol extract_len: the numbers of the length to be extracted output: data: the channel have been extracted return: none author: Shen Ke version: v1.0 2007.11.15 ****************************************************************** */ void SimpleExtract_DFT(Complex *data, int len, int extract_len) { int i; for (i=extract_len; i<len; i++) { data[i].real=0; data[i].imag=0; } } /* ******************************************************************** functionname: ImprovedExtract_DFT description: to extract the energy paths improvely after DFT in the time domain input: data: the channel estimated after DFT in the time domain len: the length of a symbol output: data: the channel after the extraction return: none reference: 2007.11.15周报 author: Shen Ke version: v1.0 2007.11.15 ******************************************************************** */ //这个方法的长度数据都是文章给定的,若要改进,则需要自己测试性能数据 void ImprovedExtract_DFT(Complex *data, int len) { int i,j; double *mean; //the average of every eight channels' amplitude's abs double *ratio; //the rate of every mean to the mean(0) double threhold=0; //the summery of the ratios int T_threhold; //the threhold to decide the numbers of paths to be extracted double r1=1.68, r2=2.1; //the threhold to decide the T_threhold mean=(double*)malloc(sizeof(double)*4); if(mean == NULL) { printf("Sorry, mean can't be allocated, please check energy extract.c\n"); exit(0); } memset(mean, 0, sizeof(double)*4); ratio=(double*)malloc(sizeof(double)*4); if(ratio == NULL) { printf("Sorry, ratio can't be allocated, please check energy extract.c\n"); exit(0); } memset(ratio, 0, sizeof(double)*4); /*mean is the average of every 8 estimated CIR's amplitude*/ for (i=0; i<4; i++) //here,we take the 32 paths in the front { for (j=0; j<8; j++) { mean[i] +=Abs(data[i*8 +j]); } mean[i]=mean[i]/8.0; } for (i=0; i<4; i++) //the ratio is the every mean to mean[0] { ratio[i]=mean[i]/mean[0]; threhold +=ratio[i]; //threhold is the summary of the ratios } if (threhold<=r1) //use threhold and r1,r2 to decide the T_threhold { T_threhold=12; } if ((threhold>r1)&&(threhold<=r2)) { T_threhold=26; } if (threhold>r2) { T_threhold=32; } for (i=T_threhold; i<len; i++) //use the T_threhold to decide the numbers of paths to be extracted { data[i].real=0; data[i].imag=0; } free(mean); mean=NULL; free(ratio); ratio=NULL; }
评论
    相关推荐
    • qesf-after.rar
      用VB编辑的可以当浏览器使用的程序 经测试,可以使用,
    • lmnrning_after.rar
      公文签收系统,可以上传文件等,值得学习,很好的源码,
    • AfterEffects-Cinder
      Adobe After Effects的面板,它可以控制从atarabi:AppAE继承的应用程序。 另请参阅和。 安装 解压缩AfterEffects-Cinder.zxp并将其放置在extensions文件夹中。 在Mac上: 〜/图书馆/应用程序支持/ Adob​​e / CEP ...
    • after_github
      after_github
    • Java After Hours
      Java After Hours: 10 Projects You'll Never Do at Work
    • qemu after modify
      修改过debian/rules的qemu1.4
    • nexrender:After数据驱动的After Effects自动化渲染
      自动执行Adobe After Effects渲染工作流程。 创建数据驱动和基于模板的视频。 使用nodejs充满爱地构建•由和其他带给您 目录 介绍 nexrender是一个简单,小型,经过精心设计的应用程序,其主要目标是针对基于Adobe ...
    • after-effects:将指令从node.js发送到After Effects脚本环境
      您正在运行安装了After Effects的node.js服务器,并且希望在服务器端运行渲染命令。 您在本地使用node.js,并且不希望通过ExtendScript工具箱运行AE脚本。 您想使用ES6语法运行和创建AE脚本。 因为它激怒了您...
    • spark-after-dark
      请将此存储库克隆到您的主目录,以便可以按以下方式访问/ data: 〜/ spark-after-dark /数据 跑步 请从主目录运行您的spark-shell命令,以便可以从Spark应用程序代码中访问数据文件,如下所示(相对于当前目录/主...
    • beforeafter.rar
      JQuery to realize image contrast effects can be used for image alignment function, both side is used to display images through the effect of the treatment before and after contrast, around the mouse ...