MATLAB
MATLAB
MATLAB
hdchan.StorePathGains = 1;
hdchan.ResetBeforeFiltering = 0;
hdchan.NormalizePathGains = 1;
for n = 1:numSNR
hChan.SNR = SNR(n);
rxSig = step(hChan,fadedSig); % Add Gaussian noise
rx = step(hDemod, rxSig); % Demodulate
reset(hErrorCalc)
% Compute error rate.
berVec(:,n) = step(hErrorCalc,tx,rx);
end
BER_LM = berVec(1,:);
for n = 1:numSNR
hChan.SNR = SNR(n);
rxSig = step(hChan,fadedSig); % Add Gaussian noise
rx = step(hDemod, rxSig); % Demodulate
reset(hErrorCalc)
% Compute error rate.
berVec(:,n) = step(hErrorCalc,tx,rx);
end
BER_HD = berVec(1,:);
hdchan.StorePathGains = 1;
hdchan.ResetBeforeFiltering = 0;
hdchan.NormalizePathGains = 1;
for n = 1:numSNR
hChan.SNR = SNR(n);
rxSig = step(hChan,fadedSig); % Add Gaussian noise
rx = step(hDemod, rxSig); % Demodulate
reset(hErrorCalc)
% Compute error rate.
berVec(:,n) = step(hErrorCalc,tx,rx);
end
BER_LM = berVec(1,:);
for n = 1:numSNR
hChan.SNR = SNR(n);
rxSig = step(hChan,fadedSig); % Add Gaussian noise
rx = step(hDemod, rxSig); % Demodulate
reset(hErrorCalc)
% Compute error rate.
berVec(:,n) = step(hErrorCalc,tx,rx);
end
BER_HD = berVec(1,:);