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

  • 大小: 2KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-10
  • 語言: C/C++
  • 標(biāo)簽: bpsk??C++??

資源簡介

bpsk的C語言代碼,已經(jīng)驗(yàn)證可用,用于移動(dòng)通信作業(yè),環(huán)境是VC++6.0

資源截圖

代碼片段和文件信息

//?------------------------------------------------------------------------
//??File:?golay24.c
//
//??An?arithmetic?decoder?for?the?(24128)?Golay?code.
//??Note:?The?C?code?below?assumes?execution?in?a?16-bit?computer.
//??Inspired?by?Stephen?Wicker‘s?book?pp.?143-144.
//?------------------------------------------------------------------------
//?This?program?is?complementary?material?for?the?book:
//
//?R.H.?Morelos-Zaragoza?The?Art?of?Error?Correcting?Coding?Wiley?2002.
//
//?ISBN?0471?49581?6
//
//?This?and?other?programs?are?available?at?http://the-art-of-ecc.com
//
//?You?may?use?this?program?for?academic?and?personal?purposes?only.?
//?If?this?program?is?used?to?perform?simulations?whose?results?are?
//?published?in?a?journal?or?book?please?refer?to?the?book?above.
//
//?The?use?of?this?program?in?a?commercial?product?requires?explicit
//?written?permission?from?the?author.?The?author?is?not?responsible?or?
//?liable?for?damage?or?loss?that?may?be?caused?by?the?use?of?this?program.?
//
//?Copyright?(c)?2002.?Robert?H.?Morelos-Zaragoza.?All?rights?reserved.
//?------------------------------------------------------------------------
#include?
#include?
#include?
#include?
#include?
#include?
#define?MAX_RANDOM?LONG_MAX????//?Maximum?value?of?random()?
#define?znew?(z=36969*(z&65535)+(z>>16))
#define?wnew?(w=18000*(w&65535)+(w>>16))
#define?MWC?((znew<<16)+wnew?)
#define?SHR3?(jsr^=(jsr<<17)?jsr^=(jsr>>13)?jsr^=(jsr<<5))
#define?CONG?(jcong=69069*jcong+1234567)
#define?KISS?((MWC^CONG)+SHR3)
#define?UNI?(KISS*2.328306e-10)
typedef?unsigned?long?UL;
/*?Global?static?variables:?*/
static?UL?z=362436069?w=521288629?jsr=123456789?jcong=380116160;

//Generate?Gaussian?distributed?random?variates
double?G(double?Udouble?S2)
{
double?U1U2V1V2WYX1X2;
do{
U1=UNI; U2=UNI;
V1=2*U1-1;?V2=2*U2-1;
W=V1*V1+V2*V2;
}while(W>1);
Y=sqrt((-2*log(W)/W));
X1=V1*Y;?X2=V2*Y;
X1=X1*sqrt(S2)+U;X2=X2*sqrt(S2)+U;
return?X1;
}

int?ij;
int?k=12;
int?biterrorerrordecerror;

double?rate;

int?ebnoloop;
double?berattnsigma;

double?mocode[12];
int?decode[12];
int?data[12];
void?main()
?{
???int?i;

//???long?seed;
???rate=0.5;

for(ebno=0;ebno<=8;ebno++)
{
attn=0.5/rate*pow(10.0-(ebno/10.0));
sigma=sqrt(attn);

ber=0;
// decerror?=?0;
biterror=0;
loop=0;

?while?(biterror<100)
?{

???/*?--------------?Random?generation?of?a?codeword?-----------------?*/
???for?(i?=?0;?i??????data[i]?=?KISS?%?2;

???/*?---------------------?BPSK?modulation?-------------------------?*/

???
???for?(i=0;i???{???
???mocode[i]=2*data[i]-1;
???}

???/*---------------------?AWGN?channel?--------------------*/
???for(i=0;i???{
???mocode[i]=mocode[i]+G(01)*sigma;
???}

???/*?---------------------?BPSK?demodulation?-------------------------?*/
???for(i=0;i??

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????3609??2009-01-27?21:20??bpskC++\bpsk.cpp

?????目錄??????????0??2015-07-31?10:17??bpskC++

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

?????????????????3609????????????????????2


評論

共有 條評論