資源簡介
該程序是通信工程中 常用的DBPSK系統的仿真,可以通過該程序完成二進制數據的傳輸測試
代碼片段和文件信息
%產生原碼
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?%相干解調
????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);%測出濾波器延時
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????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
- 上一篇:matlab RLE解碼文件代碼
- 下一篇:用Matlab解無約束優化問題+
評論
共有 條評論