EXP 3 Multipath Channels: Kishore K. Das
EXP 3 Multipath Channels: Kishore K. Das
EXP 3 Multipath Channels: Kishore K. Das
Kishore K. Das
function [BER, numBits] = BERTool_MPSK(EbNo, maxNumErrs, maxNumBits)
persistent FullOperatingTime
% Display Line on the Start of Imitation Modeling
disp('======================================');
% Start time
tStart = clock;
% Total duration of Imitation Modeling
% Saving for each trials. To restart need 'clear all' command.
if isempty(FullOperatingTime)
FullOperatingTime = 0;
end
% Symbol Rate
Rs = 1e3;
% Modulation Order
M = 2;
% Number of Bits in Symbol
k = log2(M);
% Rayleigh Channel
[SignalChan1, PathGains] = RayleighChannel(SignalTx);
% AWGN Channel
SignalChan2 = AWGNChannel(SignalChan1);
% BER Calculation
BERIm = BERCalculater(DataTx, DataRx);
end
tLoop2 = clock;
% BER Results
BER = BERIm(1);
numBits = BERIm(3);
disp(['BER = ', num2str(BERIm(1), '%.5g'), ' at Eb/No = ', num2str(EbNo), ' dB']);
disp(['Number of bits = ', num2str(BERIm(3))]);
disp(['Number of errors = ', num2str(BERIm(2))]);