%***********?‾????main.m***********
clear
clc
%N=input('walsh???℅??N=');
N=16;
for i=1:4
switch i
case 1
%nA=input('???∫A????nA=');
nA=fix(unifrnd(0,255));%?迆?迆????℅??????迆????
m=i+1;
figure(1);
[nA_2,ChannelA]=send_module(nA,N,m);
case 2
%nB=input('???∫B????nB=');
nB=fix(unifrnd(0,255));%?迆?迆????℅??????迆????
m=i+1;
figure(2);
[nB_2,ChannelB]=send_module(nB,N,m);
case 3
%nC=input('???∫C????nC=');
nC=fix(unifrnd(0,255));%?迆?迆????℅??????迆????
m=i+1;
figure(3);
[nC_2,ChannelC]=send_module(nC,N,m);
case 4
%nD=input('???∫D????nD=');
nD=fix(unifrnd(0,255));%?迆?迆????℅??????迆????
m=i+1;
figure(4);
[nD_2,ChannelD]=send_module(nD,N,m);
otherwise
disp('error');
end
i=i+1;
end
figure(5);
Channel=ChannelA+ChannelB+ChannelC+ChannelD;
q=1:1:128*8;
subplot(2,1,1);
plot(q,Channel);
title('????????')
axis([1 1024 -5 5])
snr=0000.1;
y = awgn(Channel,snr,'measured') ;
subplot(2,1,2);
plot(q,y);
axis([1 1024 -15.5 15.5])
title('????????')
for i=1:4;
switch i
case 1
m=i+1;
figure(6);
receiveA=receive_module(N,y,m);
case 2
m=i+1;
figure(7);
receiveB=receive_module(N,y,m);
case 3
m=i+1;
figure(8);
receiveC=receive_module(N,y,m);
case 4
m=i+1;
figure(9);
receiveD=receive_module(N,y,m);
otherwise
disp('error');
end
i=i+1;
end
%???赤?????‾
send=[nA_2;nB_2;nC_2;nD_2;]
receive=[receiveA;receiveB;receiveC;receiveD;]
count=0;
for i=1:32
if send(i)~=receive(i)
count=count+1;
end
end
disp('?車??????');


海神之光
- 粉丝: 6w+
最新资源
- 【微信小程序源码】仿TB模板.zip
- 【微信小程序源码】仿爱卡.zip
- 【微信小程序源码】仿阿姨帮.zip
- 【微信小程序源码】仿爱靓女带后台.zip
- 【微信小程序源码】仿爱卡汽车.zip
- 【微信小程序源码】仿斗鱼直播小程序.zip
- 【微信小程序源码】仿哔哩哔哩.zip
- 【微信小程序源码】仿逗乐趣图段子.zip
- 【微信小程序源码】仿饿了么.zip
- 【微信小程序源码】仿今日头条.zip
- 【微信小程序源码】仿美团外卖.zip
- 【微信小程序源码】仿拉钩App小程序.zip
- 【微信小程序源码】仿善林宝.zip
- 【微信小程序源码】仿丸子地球地区查询.zip
- 【微信小程序源码】仿腾讯视频小程序.zip
- 【微信小程序源码】仿网易蜗牛读书.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



- 1
- 2
前往页