?? bpsk_r.m
字號:
%BPSK的R參數分析歸一化
figure(24)
hold on;
for ii=1:100;
ii
clear
df=0.15;
fs=20;%20MHz
fc=2;
rb=0.2;
ts=1/fs;
m=256;
n=40
a=sj(m,n);
%sj(m,n)的解釋參見sj.m,sj(m,20)的作用相當于上面的for循環
t=0:1:m*n-1;
Fc1=sin(8*pi*t/n);
b=1-a;
u0=a.*Fc2+b.*Fc1;
for k=1:20 %對應程序結尾的end
k
%產生白噪聲
snr=k;%S/N
snr_lin=10^(snr/10);%線性信噪比
signal_power=(norm(u0)^2)/length(u0);
noise_power=signal_power/snr_lin;
noise_std=sqrt(noise_power);
noise=noise_std*randn(1,length(u0));
u1=u0+noise;%加白噪聲
uls=length(u1);
maxu1=max(u1);
u=u1/maxu1;
%求瞬時平方包絡
v=blpf(u);
%均值
miu=mean(v);
%方差
delt=var(v);
%求R參數
r(k)=delt/(miu^2);
% plot(i,a1,'r+')
% plot(i,a2,'r*')
plot(i,r)
% plot(i,cw,'go')
end
hold off;
xlabel('信噪比(dB)')
title('歸一化BPSK R參數(仿真100次)')
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -