<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="generator" content="pdf2htmlEX">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css">
<link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css">
<link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/626708224f8811599ec97278/raw.css">
<script src="https://static.pudn.com/base/js/compatibility.min.js"></script>
<script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script>
<script>
try{
pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({});
}catch(e){}
</script>
<title></title>
</head>
<body>
<div id="sidebar" style="display: none">
<div id="outline">
</div>
</div>
<div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/626708224f8811599ec97278/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">k=1000;<span class="fc1">%k<span class="_ _0"> </span><span class="ff2">为码元数</span></span></div><div class="t m0 x1 h4 y3 ff1 fs0 fc0 sc0 ls0 ws0">code=randi([0,1],1,k);</div><div class="t m0 x1 h4 y4 ff1 fs0 fc0 sc0 ls0 ws0">decode=0;</div><div class="t m0 x1 h4 y5 ff1 fs0 fc0 sc0 ls0 ws0">fs=1000;</div><div class="t m0 x1 h4 y6 ff1 fs0 fc0 sc0 ls0 ws0">f=0:99;</div><div class="t m0 x1 h4 y7 ff1 fs0 fc0 sc0 ls0 ws0">a=0;</div><div class="t m0 x1 h4 y8 ff1 fs0 fc0 sc0 ls0 ws0">t=1/10/fs:1/10/fs:k/fs;</div><div class="t m0 x1 h4 y9 ff1 fs0 fc2 sc0 ls0 ws0">for<span class="fc0"> i=1:k</span></div><div class="t m0 x1 h4 ya ff1 fs0 fc0 sc0 ls0 ws0">y=cos(2*pi*fs*t((10*(i-1)+1):10*i)+code(i)*pi);</div><div class="t m0 x1 h4 yb ff1 fs0 fc0 sc0 ls0 ws0">a=[a,y];</div><div class="t m0 x1 h4 yc ff1 fs0 fc2 sc0 ls0 ws0">end</div><div class="t m0 x1 h4 yd ff1 fs0 fc0 sc0 ls0 ws0">a=a(2:10*k+1);</div><div class="t m0 x1 h4 ye ff1 fs0 fc0 sc0 ls0 ws0">plot(t,a);</div><div class="t m0 x1 h4 yf ff1 fs0 fc0 sc0 ls0 ws0">carry=cos(2*pi*fs*t);</div><div class="t m0 x1 h4 y10 ff1 fs0 fc0 sc0 ls0 ws0">y1=carry<span class="_ _1"></span>.*a;</div><div class="t m0 x1 h4 y11 ff1 fs0 fc0 sc0 ls0 ws0">plot(t,y1);</div><div class="t m0 x1 h4 y12 ff1 fs0 fc0 sc0 ls0 ws0">Y=fft<span class="_ _2"></span>(y1,10*k);</div><div class="t m0 x1 h4 y13 ff1 fs0 fc0 sc0 ls0 ws0">Y(2*k:8*k+2)=0;</div><div class="t m0 x1 h4 y14 ff1 fs0 fc0 sc0 ls0 ws0">y0=ifft(Y<span class="_ _3"></span>,k*10);</div><div class="t m0 x1 h4 y15 ff1 fs0 fc0 sc0 ls0 ws0">plot(t,y0);</div><div class="t m0 x1 h4 y16 ff1 fs0 fc2 sc0 ls0 ws0">for<span class="fc0"> j=1:k</span></div><div class="t m0 x1 h4 y17 ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc2">if</span> y0(10*(j-1)+5)>0</div><div class="t m0 x1 h4 y18 ff1 fs0 fc0 sc0 ls0 ws0"> decode=[decode,0];</div><div class="t m0 x1 h4 y19 ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc2">end</span></div><div class="t m0 x1 h4 y1a ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc2">if</span> y0(10*(j-1)+5)<0</div><div class="t m0 x1 h4 y1b ff1 fs0 fc0 sc0 ls0 ws0"> decode=[decode,1];</div><div class="t m0 x1 h4 y1c ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc2">end</span></div><div class="t m0 x1 h4 y1d ff1 fs0 fc2 sc0 ls0 ws0">end</div><div class="t m0 x1 h4 y1e ff1 fs0 fc0 sc0 ls0 ws0">decode=decode(2:k+1);</div></div></div><div class="pi" data-data='{"ctm":[1.568627,0.000000,0.000000,1.568627,0.000000,0.000000]}'></div></div>
</body>
</html>