Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 <=16
clear
clc
format shorte
M=16%Modulation Order or Number of Symbols
MM=M^2
m=log2(M)%Number of Bits per Symbol
nn=4*m; %Number of Bits or Symbols
QAM_16=qammod([0:M-1],M)%QAM16 Modulation or QAM16 Signal Set
Epsilon=(sum(abs(QAM_16).^2))/length(QAM_16)%Average Sum of Energy or Energy per Symbol
Nt=2
Nr=4
SNR_db=[5:3:23]%[0:2:20]%SNR in dB
SNR_dec=(10.^(SNR_db./10))/Nt %SNR in Decimal or Linear SNR
Sigma=sqrt(Epsilon./SNR_dec);
Num_Err=1.0*[60050040030020010050];
Teta=(1+sqrt(5))/2;
Teta_=1-Teta;
Alpha=1+(1j*Teta_);
Alpha_=1+(1j*(1-Teta_));
Gamma=1j;
map_2=[00; 01;10;11];
t=0;
for k_1=1:4
for k_2=1:4
t=t+1;
map_4(t,:)=[map_2(k_1,:) map_2(k_2,:)];
end
end
tt=0;
for ii=1:M
for jj=1:M
tt=tt+1;
x11=(1/sqrt(5))*Alpha*(QAM_16(ii)+QAM_16(jj)*Teta); %x11
x22=(1/sqrt(5))*Alpha_*(QAM_16(ii)+QAM_16(jj)*Teta_); %x22
x12=(1/sqrt(5))*Alpha*(QAM_16(ii)+QAM_16(jj)*Teta); %x12
x21=(1/sqrt(5))*Alpha_*(QAM_16(ii)+QAM_16(jj)*Teta_)*Gamma; %x21
Golden_Code_Set(tt,:)=[x11 x22 x12 x21];
Golden_Code_Set_1(tt)=x11;
Golden_Code_Set_2(tt)=x22;
Golden_Code_Set_3(tt)=x12;
Golden_Code_Set_4(tt)=x21;
end
end
% Creating the Symbol Dection subset (SDS)
% SDS ={(x11_hat,x22_hat),|x11-x11_hat|^2|x22-x22_hat|^2<= d, x11_hat,x22_hat E[Omega_G]}
uu=0;
for uu1=1:M
for uu2=1:M
uu=uu+1;
x11=Golden_Code_Set_1(uu);
x22=Golden_Code_Set_2(uu);
cc=0;
uu_=0;
for uu_1=1:M
for uu_2=1:M
uu_=uu_+1;
x11_hat=Golden_Code_Set_1(uu_);
x22_hat=Golden_Code_Set_2(uu_);
if ((abs(x11-x11_hat).^2*abs(x22-x22_hat).^2)<=16)
cc=cc+1;
SDS_idx_set(uu,cc)=uu_; % Index Set of SDS
SDS_sym_set_1(uu,cc)=Golden_Code_Set_1(uu_); % Symbols set of SDS
SDS_sym_set_2(uu,cc)=Golden_Code_Set_2(uu_);
end
end
end
Cdy(uu)=cc; % Cardinality of Symbols near symbol x_i.
L(uu)=abs(x11-x11_hat).^2*abs(x22-x22_hat).^2;
end
end
sum(Cdy)/length(Cdy)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 10g Insider Solutions

Authors: Arun R. Kumar, John Kanagaraj, Richard Stroupe

1st Edition

0672327910, 978-0672327919

More Books

Students also viewed these Databases questions

Question

What is human nature?

Answered: 1 week ago