Question: Rewrite the Matlab code below correctly to generate dtection subset for < = 1 6 clear clc format shorte M = 1 6 % Modulation
Rewrite the Matlab code below correctly to generate dtection subset for
clear
clc
format shorte
MModulation Order or Number of Symbols
MMM
mlogMNumber of Bits per Symbol
nnm; Number of Bits or Symbols
QAMqammod:MMQAM Modulation or QAM Signal Set
EpsilonsumabsQAMlengthQAMAverage Sum of Energy or Energy per Symbol
Nt
Nr
SNRdb::::SNR in dB
SNRdecSNRdbNt SNR in Decimal or Linear SNR
SigmasqrtEpsilonSNRdec;
NumErr;
Tetasqrt;
TetaTeta;
AlphajTeta;
AlphajTeta;
Gammaj;
map; ;;;
t;
for k:
for k:
tt;
mapt:mapk: mapk:;
end
end
tt;
for ii:M
for jj:M
tttt;
xsqrtAlphaQAMiiQAMjjTeta; x
xsqrtAlphaQAMiiQAMjjTeta; x
xsqrtAlphaQAMiiQAMjjTeta; x
xsqrtAlphaQAMiiQAMjjTetaGamma; x
GoldenCodeSettt:x x x x;
GoldenCodeSetttx;
GoldenCodeSetttx;
GoldenCodeSetttx;
GoldenCodeSetttx;
end
end
Creating the Symbol Dection subset SDS
SDS xhat,xhatxxhatxxhat d xhat,xhat EOmegaG
uu;
for uu:M
for uu:M
uuuu;
xGoldenCodeSetuu;
xGoldenCodeSetuu;
cc;
uu;
for uu:M
for uu:M
uuuu;
xhatGoldenCodeSetuu;
xhatGoldenCodeSetuu;
if absxxhatabsxxhat
cccc;
SDSidxsetuuccuu; Index Set of SDS
SDSsymsetuuccGoldenCodeSetuu; Symbols set of SDS
SDSsymsetuuccGoldenCodeSetuu;
end
end
end
Cdyuucc; Cardinality of Symbols near symbol xi
Luuabsxxhatabsxxhat;
end
end
sumCdylengthCdy
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
