⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ber_fsk.m

📁 Bit Erroe Rate for FSK in MatLab
💻 M
字号:
%Programme to plot the BER performance curves for coherent and non-coherent
%binary FSK.

%Written by Andrew Bateman.

%set up figure numbers and location on the screen

figure(1)
close
h=figure('position',[90 341 394 369],'color',[1,1,0]);
h=axes('position',[100,331,404,379],'color',[0,1,0]);
clf

%initialise vectors

Pcohfsk=[];
Pnoncfsk=[];
xaxis1=[];
xaxis2=[];

%Calculate BER results

for j = 1:100 
i=j/5;
EbNo=10^(i/10);
cohfsk= 0.5*(erfc(sqrt(EbNo/2)));
if cohfsk < 1e-6, ,break, end
Pcohfsk(j)=cohfsk;
xaxis1(j)=i;
end

for j = 1:100 
i=j/5;
EbNo=10^(i/10);
noncfsk=0.5*exp(-EbNo/2);
if noncfsk < 1e-6, ,break, end
Pnoncfsk(j)=noncfsk;
xaxis2(j)=i;
end

figure(1)
semilogy(xaxis1,Pcohfsk,'-g','linewidth',2);
hold on
semilogy(xaxis2,Pnoncfsk,'-y','linewidth',2);
title('BER curves for FSK')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -