資源簡(jiǎn)介
該程序是通信工程中 常用的DBPSK系統(tǒng)的仿真,可以通過(guò)該程序完成二進(jìn)制數(shù)據(jù)的傳輸測(cè)試
代碼片段和文件信息
%產(chǎn)生原碼
M=10;
t1=linspace(00.001*M60*M);
source=rand(1M);
for?i=1:M
????if?source(i)>=0.5
????????source(i)=1;
????else?source(i)=0;
????end
end
for?i=1:M
????if?source(i)==1
????????for?j=1:60
????????????sourcecode(j+60*(i-1))=1;
????????????sourcecode1(j+60*(i-1))=1;
????????end
????else?for?j=1:60
????????????sourcecode(j+60*(i-1))=0;
????????????sourcecode1(j+60*(i-1))=-1;
????????end?
????end
end
t2=linspace(00.00160);
carrier=cos(2000*pi*t2+0.5*pi);
for?i=1:M
????for?j=1:60
????????encode(j+60*(i-1))=sourcecode1(j+60*(i-1))*carrier(j);
????end
end
length(t1)
length(encode)
for?i=1:M?%相干解調(diào)
????for?j=1:60
????decode(j+60*(i-1))=encode(j+60*(i-1))*carrier(j);
????end
end
load?mypass?lowpasser;
LEN=fix(length(lowpasser)/2);%測(cè)出濾波器延時(shí)
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????873??2010-01-03?22:52??mypass.mat
?????文件???????2050??2010-01-06?13:14??DBPSK.m
?????文件???????1504??2010-01-06?13:15??BPSK.m
-----------?---------??----------?-----??----
?????????????????4427????????????????????3
評(píng)論
共有 條評(píng)論