clc
close all
EbNodB=-4:1:24 % Signal to Noise Ratio in
dB
EbNolin=10.^(EbNodB/10); % Converting SNR to non dB
scale
colors={'k-x','r-h'}; %defining Colors to differentiate two
Plots
index=1 % fetches colors one by one from previously defined
colors sequence
% DPSK
Pb=0.5*exp(-EbNolin); % Biterrorrate
calculation
plotHandle=plot(EbNodB,log10(Pb),char(colors(index))); %
plot of Bit error rate in dB vs SNR(dB)
set(plotHandle,'LineWidth',1.5); % define plot
properties
index=index+1; % increment index value to 2 , to fetch
second color
hold on; % plot two graphs in same plot
% Coherent QPSK
Pb=0.5*erfc(sqrt(EbNolin));
plotHandle=plot(EbNodB,log10(Pb),char(colors(index)));
set(plotHandle,'LineWidth',1.5);
Output
09-13: The figure below shows comparison of the noise performance of different PSK and FSK schemes...