91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 111KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-07
  • 語言: C/C++
  • 標簽:

資源簡介

很好的函數自相關程序代碼,適合信號處理相干人士學習

資源截圖

代碼片段和文件信息

#include?
#include?
#include?

#define?NN?10

void?xcorr(float?*r?unsigned?short?*x?unsigned?short?*y?int?N);

int?main()
{??
????unsigned?short?x[10]={1122345678};
????unsigned?short?y[10]={1345678952};
????float?r[19]?=?{0};
????
????FILE?*fp_out;
????int?delay;
????
????xcorr(r?x?y?NN);
//Open?the?file?to?write
????if((fp_out=fopen(“out_xcorr.txt““wt“))?==?NULL)
{
????printf(“Cannot?open?this?file!\n“);
exit(0);
}

for(delay?=?-NN?+?1;?delay?????????fprintf(fp_out“%d?%f\n“delayr[delay?+?NN?-?1]);

????fclose(fp_out);
system(“pause“);
return?0;
}

void?xcorr(float?*r?unsigned?short?*x?unsigned?short?*y?int?N)
{
????float?sxy;
????int????delayij;
????
for(delay?=?-N?+?1;?delay? {
????//Calculate?the?numerator
????sxy?=?0;
????for(i=0;?i ????{
????????j?=?i?+?delay;
????? ????if((j?=?N))??//The?series?are?no?wrappedso?the?value?is?ignored
????????????continue;
????????else
????????????sxy?+=?(x[i]?*?y[j]);
????}
????
????//Calculate?the?correlation?series?at?“delay“
????r[delay?+?N?-?1]?=?sxy;
????}
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????476814??2009-12-31?17:23??xcorr\cross_correlation.exe

?????文件????????871??2009-12-31?17:34??xcorr\Makefile.win

?????文件????????261??2009-12-31?17:34??xcorr\out_xcorr.txt

?????文件???????1209??2009-12-31?17:28??xcorr\xcorr.c

?????文件????????825??2009-12-31?17:28??xcorr\xcorr.dev

?????文件??????17070??2009-12-31?17:34??xcorr\xcorr.exe

?????文件???????1360??2009-12-31?17:34??xcorr\xcorr.o

?????目錄??????????0??2009-12-31?17:34??xcorr

-----------?---------??----------?-----??----

???????????????498410????????????????????8


評論

共有 條評論

相關資源