You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
936 B
27 lines
936 B
function [MCS, mcs_no] = MCS_sel(ModulationMode,CodeRate)
|
|
CodeRate = eval(CodeRate);
|
|
switch ModulationMode
|
|
case 'BPSK'
|
|
MCS = 0;
|
|
mcs_no = [2,2];
|
|
case 'QPSK'
|
|
if(CodeRate==1/2)
|
|
MCS = 1;mcs_no = [4,2]; end
|
|
if CodeRate==3/4
|
|
MCS = 2;mcs_no = [4,4]; end
|
|
case '16QAM'
|
|
if CodeRate==1/2
|
|
MCS = 3;mcs_no = [16,2]; end
|
|
if CodeRate==2/3
|
|
MCS = 4;mcs_no = [16,3]; end
|
|
if CodeRate==3/4
|
|
MCS = 4;mcs_no = [16,4]; end
|
|
case '64QAM'
|
|
if CodeRate==2/3
|
|
MCS = 5;mcs_no = [64,3]; end
|
|
if CodeRate==3/4
|
|
MCS = 6;mcs_no = [64,4]; end
|
|
if CodeRate==5/6
|
|
MCS = 7;mcs_no = [64,6]; end
|
|
end
|
|
end
|
|
|