资源简介
非常详细,有条理的代码,可以画图,已经编译通过
代码片段和文件信息
clear;
clc;
Rep=10; %初始化
Num=500000;
snr=0:3:30;
error0=0;
error1=0;
error2=0;
error4=0;
error8=0;
p0=zeros(1length(snr));
p1=zeros(1length(snr));
p2=zeros(1length(snr));
p3=zeros(1length(snr));
p4=zeros(1length(snr));
for i=1:length(snr)
error0=0;
error1=0;
error2=0;
error4=0;
error8=0;
sigma0=10^(-snr(i)/20);
sigma1=10^(-snr(i)/20);
sigma2=sqrt(2)*10^(-snr(i)/20);
sigma4=2*10^(-snr(i)/20);
sigma8=2*sqrt(2)*10^(-snr(i)/20);
for j=1:Rep
x_re=randsrc(1Num); %输入信号
x_im=randsrc(1Num);
x=x_re+1i*x_im;
Rly_re=randn(1Num); %瑞利信道
Rly_im=randn(1Num);
Rly=Rly_re+1i*Rly_im;
R0=sqrt(Rly.*conj(Rly));
Rly_re1=randn(1Num);
Rly_im1=randn(1Num);
Rly1=Rly_re1+1i*Rly_im1;
R1=sqrt(Rly1.*conj(Rly1));
Rly_re2=randn(1Num);
Rly_im2=randn(1Num);
Rly2=Rly_re2+1i*Rly_im2;
R2=sqrt(Rly2.*conj(Rly2));
Rly_re3=randn(1Num);
Rly_im3=randn(1Num);
Rly3=Rly_re3+1i*Rly_im3;
R3=sqrt(Rly3.*conj(Rly3));
Rly_re4=randn(1Num);
Rly_im4=randn(1Num);
Rly4=Rly_re4+1i*Rly_im4;
R4=sqrt(Rly4.*conj(Rly4));
Rly_re5=randn(1Num);
Rly_im5=randn(1Num);
Rly5=Rly_re5+1i*Rly_im5;
R5=sqrt(Rly5.*conj(Rly5));
Rly_re6=randn(1Num);
Rly_im6=randn(1Num);
Rly6=Rly_re6+1i*Rly_im6;
R6=sqrt(Rly6.*conj(Rly6));
Rly_re7=randn(1Num);
Rly_im7=randn(1Num);
Rly7=Rly_re7+1i*Rly_im7;
R7=sqrt(Rly7.*conj(Rly7));
%AWGN信道噪声无分集噪声
Noise_re=sigma0*randn(1Num);
Noise_im=sigma0*randn(1Num);
Noise0=Noise_re+1i*Noise_im;
%二分集噪声
Nois_re1=sigma2*randn(1Num);
Nois_im1=sigma2*randn(1Num);
Nois1=Nois_re1+1i*Nois_im1;
Nois_re2=sigma2*randn(1Num);
Nois_im2=sigma2*randn(1Num);
Nois2=Nois_re2+1i*Nois_im2;
%四分集噪声
Noi_re1=sigma4*randn(1Num);
Noi_im1=sigma4*randn(1Num);
Noi1=Noi_re1+1i*Noi_im1;
Noi_re2=sigma4*randn(1Num);
Noi_im2=sigma4*randn(1Num);
Noi2=Noi_re2+1i*Noi_im2;
Noi_re3=sigma4*randn(1Num);
Noi_im3=sigma4*randn(1Num);
Noi3=Noi_re3+1i*Noi_im3;
Noi_re4=sigma4*randn(1Num);
Noi_im4=sigma4*randn(1Num);
Noi4=Noi_re4+1i*Noi_im4;
%八分集噪声
No_re=sigma8*randn(1Num);
No_im=sigma8*randn(1Num);
No0=No_re+1i*No_im;
No_re1=sigma8*randn(1Num);
No_im1=sigma8*randn(1Num);
No1=Noi_re1+1i*Noi_im1;
No_re2=sigma8*ran
- 上一篇:MATLAB RGB和YUV格式相互转化
- 下一篇:信道容量的仿真代码
相关资源
- BPSK和QPSK调制解调原理及MATLAB程序
- 基于-MATLAB-的QPSK系统仿真设计与实现
- 单载波为、BPSK、QPSK三种情况下锁相环
- 5份基于MATLAB的关于扩频+BPSK/QPSK仿真代
- 4份直接序列扩频+BPSK/QPSK的MATLAB仿真程
- 一个小通信系统的MATLAB源代码仿真或
-
OFDM的QPSK的simuli
nk仿真,matlab 2016a版 - 多进制空时分组码(STBC)matlab仿真
- QPSK信号+白噪声程序MATLAB
- 瑞利衰落信道的matlab仿真程序
-
QPSK调制simuli
nk实现 - matlab的qpsk通信仿真
- DQPSK调制与解调
- QPSK松尾环载波同步MATLAB仿真
- 基于Matlab的PI/4 DQPSK的调制解调源代吗
- QPSK高斯白噪声信道和瑞利信道的误码
-
OQPSK调制解调器Simuli
nk仿真 - OFDM QPSK调制解调
- MATLAB课程设计(cantor三分集)
- qpsk调制stbc仿真
- QPSKMATLAB仿真程序
- 基于MATLAB的DQPSK/QPSK调制解调实现
- QPSK matlab 调制解调代码
- qpsk的matlab实现
- 8QAM、QPSK误码率计算matlab程序
- QPSK与OQPSK数字调制方式MATLAB代码
-
OQPSK的Matlab_Simuli
nk调制解调仿真系统 - 利用matlab对瑞利衰落信道仿真
-
QPSK /OQPSK simuli
nk模型 -
qpsk 调制 解调 误码 simuli
nk仿真
评论
共有 条评论