

% Spatial streams number = 1 ==============================================
% MCS 0 -------------------------------------------------------------------
wifi_params.MCS(1).N_ss = 1;
wifi_params.MCS(1).decType = decType;
wifi_params.MCS(1).MCS = 'MCS0';
wifi_params.MCS(1).CR = 1/2;
wifi_params.MCS(1).M = 2; % BPSK
wifi_params.MCS(1).N_cbps = wifi_params.mapping.n_data*log2(wifi_params.MCS(1).M)*wifi_params.MCS(1).N_ss;
wifi_params.MCS(1).N_dbps = wifi_params.MCS(1).N_cbps*wifi_params.MCS(1).CR;
wifi_params.MCS(1).hmod = modem.pskmod(...
    'M', 2,...
    'InputType', 'bit');
wifi_params.MCS(1).MOD = comm.PSKModulator(...
     'ModulationOrder', wifi_params.MCS(1).M,...
     'PhaseOffset', pi, ...
     'BitInput', true);
wifi_params.MCS(1).hdemod = modem.pskdemod(...
    'M', 2,...
    'OutputType', 'bit',...
    'DecisionType', decType);
wifi_params.MCS(1).DEMOD = comm.PSKDemodulator(...
     'ModulationOrder', wifi_params.MCS(1).M,...
     'PhaseOffset', pi,...
     'DecisionMethod', 'Log-likelihood ratio');
wifi_params.MCS(1).modNorm = 1;
% MCS 1 -------------------------------------------------------------------
wifi_params.MCS(2).N_ss = 1;
wifi_params.MCS(2).decType = decType;
wifi_params.MCS(2).MCS = 'MCS1';
wifi_params.MCS(2).CR = 1/2;
wifi_params.MCS(2).M = 4; % QPSK
wifi_params.MCS(2).N_cbps = wifi_params.mapping.n_data*log2(wifi_params.MCS(2).M)*wifi_params.MCS(2).N_ss;
wifi_params.MCS(2).N_dbps = wifi_params.MCS(2).N_cbps*wifi_params.MCS(2).CR;
wifi_params.MCS(2).hmod = modem.pskmod('M', 4,...
    'InputType', 'bit',...
    'PhaseOffset', pi/4);
wifi_params.MCS(2).hdemod = modem.pskdemod(...
    'M', 4,...
    'OutputType', 'bit',...
    'PhaseOffset',pi/4,...
    'DecisionType', decType);
wifi_params.MCS(2).modNorm = 1;
% MCS 2 -------------------------------------------------------------------
wifi_params.MCS(3).N_ss = 1;
wifi_params.MCS(3).decType = decType;
wifi_params.MCS(3).MCS = 'MCS2';
wifi_params.MCS(3).CR = 3/4;
wifi_params.MCS(3).M = 4; % QPSK
wifi_params.MCS(3).N_cbps = wifi_params.mapping.n_data*log2(wifi_params.MCS(3).M)*wifi_params.MCS(3).N_ss;
wifi_params.MCS(3).N_dbps = wifi_params.MCS(3).N_cbps*wifi_params.MCS(3).CR;
wifi_params.MCS(3).hmod = modem.pskmod('M', 4,...
    'InputType', 'bit',...
    'PhaseOffset', pi/4);
wifi_params.MCS(3).hdemod = modem.pskdemod(...
    'M', 4,...
    'OutputType', 'bit',...
    'PhaseOffset', pi/4,...
    'DecisionType', decType);
wifi_params.MCS(3).modNorm = 1;
% MCS 3 -------------------------------------------------------------------
wifi_params.MCS(4).N_ss = 1;
wifi_params.MCS(4).decType = decType;
wifi_params.MCS(4).MCS = 'MCS3';
wifi_params.MCS(4).CR = 1/2;
wifi_params.MCS(4).M = 16; % 16QAM
wifi_params.MCS(4).N_cbps = wifi_params.mapping.n_data*log2(wifi_params.MCS(4).M)*wifi_params.MCS(4).N_ss;
wifi_params.MCS(4).N_dbps = wifi_params.MCS(4).N_cbps*wifi_params.MCS(4).CR;
wifi_params.MCS(4).hmod = modem.qammod(...
    'M', 16,...
    'InputType', 'bit');              % Modulator object
wifi_params.MCS(4).hdemod = modem.qamdemod(...
    'M', 16,...
    'OutputType','bit',...
    'DecisionType', decType);            % Demodulator object
wifi_params.MCS(4).modNorm = sqrt(10);
% MCS 4
wifi_params.MCS(5).N_ss = 1;
wifi_params.MCS(5).decType = decType;
wifi_params.MCS(5).MCS = 'MCS4';
wifi_params.MCS(5).CR = 3/4;
wifi_params.MCS(5).M = 16; % 16QAM
wifi_params.MCS(5).N_cbps = wifi_params.mapping.n_data*log2(wifi_params.MCS(5).M)*wifi_params.MCS(5).N_ss;
wifi_params.MCS(5).N_dbps = wifi_params.MCS(5).N_cbps*wifi_params.MCS(5).CR;
wifi_params.MCS(5).hmod = modem.qammod(...
    'M', 16,...
    'InputType', 'bit');              % Modulator object
wifi_params.MCS(5).hdemod = modem.qamdemod(...
    'M', 16,...
    'OutputType','bit',...
    'DecisionType', decType);            % Demodulator object
wifi_params.MCS(5).modNorm = sqrt(10);
% MCS 5 -------------------------------------------------------------------
wifi_params.MCS(6).N_ss = 1;
wifi_params.MCS(6).decType = decType;
wifi_params.MCS(6).MCS = 'MCS5';
wifi_params.MCS(6).CR = 2/3;
wifi_params.MCS(6).M = 64; % 64QAM
wifi_params.MCS(6).N_cbps = wifi_params.mapping.n_data*log2(wifi_params.MCS(6).M)*wifi_params.MCS(6).N_ss;
wifi_params.MCS(6).N_dbps = wifi_params.MCS(6).N_cbps*wifi_params.MCS(6).CR;
wifi_params.MCS(6).hmod = modem.qammod(...
    'M', 64,...
    'InputType', 'bit');              % Modulator object
wifi_params.MCS(6).hdemod = modem.qamdemod(...
    'M', 64,...
    'OutputType','bit',...
    'DecisionType', decType);            % Demodulator object
wifi_params.MCS(6).modNorm = sqrt(42);
% MCS 6 -------------------------------------------------------------------
wifi_params.MCS(7).N_ss = 1;
wifi_params.MCS(7).decType = decType;
wifi_params.MCS(7).MCS = 'MCS6';
wifi_params.MCS(7).CR = 3/4;
wifi_params.MCS(7).M = 64; % 64QAM
wifi_params.MCS(7).N_cbps = wifi_params.mapping.n_data*log2(wifi_params.MCS(7).M)*wifi_params.MCS(7).N_ss;
wifi_params.MCS(7).N_dbps = wifi_params.MCS(7).N_cbps*wifi_params.MCS(7).CR;
wifi_params.MCS(7).hmod = modem.qammod(...
    'M', 64,...
    'InputType', 'bit');              % Modulator object
wifi_params.MCS(7).hdemod = modem.qamdemod(...
    'M', 64,...
    'OutputType','bit',...
    'DecisionType', decType);            % Demodulator object
wifi_params.MCS(7).modNorm = sqrt(42);
% MCS 7
wifi_params.MCS(8).N_ss = 1;
wifi_params.MCS(8).decType = decType;
wifi_params.MCS(8).MCS = 'MCS7';
wifi_params.MCS(8).CR = 5/6;
wifi_params.MCS(8).M = 64; % 64QAM
wifi_params.MCS(8).N_cbps = wifi_params.mapping.n_data*log2(wifi_params.MCS(8).M)*wifi_params.MCS(8).N_ss;
wifi_params.MCS(8).N_dbps = wifi_params.MCS(8).N_cbps*wifi_params.MCS(8).CR;
wifi_params.MCS(8).hmod = modem.qammod(...
    'M', 64,...
    'InputType', 'bit');              % Modulator object
wifi_params.MCS(8).hdemod = modem.qamdemod(...
    'M', 64,...
    'OutputType','bit',...
    'DecisionType', decType);            % Demodulator object
wifi_params.MCS(8).modNorm = sqrt(42);
% Spatial streams number = 2 ==============================================
% MCS 8 -------------------------------------------------------------------
wifi_params.MCS(9).N_ss = 2;
wifi_params.MCS(9).decType = decType;
wifi_params.MCS(9).MCS = 'MCS8';
wifi_params.MCS(9).CR = 1/2;
wifi_params.MCS(9).M = 2; % BPSK
% ----- doplnit
wifi_params.MCS(9).hmod = modem.pskmod('M', 2, 'InputType', 'bit');
wifi_params.MCS(9).hdemod = modem.pskdemod('M', 2, 'OutputType', 'bit', 'DecisionType', decType);
wifi_params.MCS(9).modNorm = 1;
% MCS 9 -------------------------------------------------------------------
wifi_params.MCS(10).N_ss = 2;
wifi_params.MCS(10).decType = decType;
wifi_params.MCS(10).MCS = 'MCS9';
wifi_params.MCS(10).CR = 1/2;
wifi_params.MCS(10).M = 4; % QPSK
wifi_params.MCS(10).hmod = modem.pskmod('M', 4, 'InputType', 'bit', 'PhaseOffset', pi/4);
wifi_params.MCS(10).hdemod = modem.pskdemod('M', 4, 'OutputType', 'bit', 'PhaseOffset', pi/4, 'DecisionType', decType);
wifi_params.MCS(10).modNorm = 1;
% MCS 10 -------------------------------------------------------------------
wifi_params.MCS(11).N_ss = 2;
wifi_params.MCS(11).decType = decType;
wifi_params.MCS(11).MCS = 'MCS10';
wifi_params.MCS(11).CR = 3/4;
wifi_params.MCS(11).M = 4; % QPSK
wifi_params.MCS(11).hmod = modem.pskmod('M', 4, 'InputType', 'bit', 'PhaseOffset', pi/4);
wifi_params.MCS(11).hdemod = modem.pskdemod('M', 4, 'OutputType', 'bit', 'PhaseOffset', pi/4, 'DecisionType', decType);
wifi_params.MCS(11).modNorm = 1;
% MCS 11 -------------------------------------------------------------------
wifi_params.MCS(12).N_ss = 2;
wifi_params.MCS(12).decType = decType;
wifi_params.MCS(12).MCS = 'MCS11';
wifi_params.MCS(12).CR = 1/2;
wifi_params.MCS(12).M = 16; % 16QAM
wifi_params.MCS(12).hmod = modem.qammod('M', 16, 'InputType', 'bit');              % Modulator object
wifi_params.MCS(12).hdemod = modem.qamdemod('M', 16, 'OutputType','bit', 'DecisionType', decType);            % Demodulator object
wifi_params.MCS(12).modNorm = sqrt(10);
% MCS 12 -------------------------------------------------------------------
wifi_params.MCS(13).N_ss = 2;
wifi_params.MCS(13).decType = decType;
wifi_params.MCS(13).MCS = 'MCS12';
wifi_params.MCS(13).CR = 3/4;
wifi_params.MCS(13).M = 16; % 16QAM
wifi_params.MCS(13).hmod = modem.qammod('M', 16, 'InputType', 'bit');              % Modulator object
wifi_params.MCS(13).hdemod = modem.qamdemod('M', 16, 'OutputType','bit', 'DecisionType', decType);            % Demodulator object
wifi_params.MCS(13).modNorm = sqrt(10);
% MCS 13 -------------------------------------------------------------------
wifi_params.MCS(14).N_ss = 2;
wifi_params.MCS(14).decType = decType;
wifi_params.MCS(14).MCS = 'MCS13';
wifi_params.MCS(14).CR = 2/3;
wifi_params.MCS(14).M = 64; % 64QAM
wifi_params.MCS(14).hmod = modem.qammod('M', 64, 'InputType', 'bit');              % Modulator object
wifi_params.MCS(14).hdemod = modem.qamdemod('M', 64, 'OutputType','bit', 'DecisionType', decType);            % Demodulator object
wifi_params.MCS(14).modNorm = sqrt(42);
% MCS 14 -------------------------------------------------------------------
wifi_params.MCS(15).N_ss = 2;
wifi_params.MCS(15).decType = decType;
wifi_params.MCS(15).MCS = 'MCS14';
wifi_params.MCS(15).CR = 3/4;
wifi_params.MCS(15).M = 64; % 64QAM
wifi_params.MCS(15).hmod = modem.qammod('M', 64, 'InputType', 'bit');              % Modulator object
wifi_params.MCS(15).hdemod = modem.qamdemod('M', 64, 'OutputType','bit', 'DecisionType', decType);            % Demodulator object
wifi_params.MCS(15).modNorm = sqrt(42);
% MCS 15 -------------------------------------------------------------------
wifi_params.MCS(16).N_ss = 2;
wifi_params.MCS(16).decType = decType;
wifi_params.MCS(16).MCS = 'MCS15';
wifi_params.MCS(16).CR = 5/6;
wifi_params.MCS(16).M = 64; % 64QAM
wifi_params.MCS(16).hmod = modem.qammod('M', 64, 'InputType', 'bit');              % Modulator object
wifi_params.MCS(16).hdemod = modem.qamdemod('M', 64, 'OutputType','bit', 'DecisionType', decType);            % Demodulator object
wifi_params.MCS(16).modNorm = sqrt(42);
% Spatial streams number = 3 ==============================================
% MCS 16 -------------------------------------------------------------------
wifi_params.MCS(17).N_ss = 3;
wifi_params.MCS(17).decType = decType;
wifi_params.MCS(17).MCS = 'MCS16';
wifi_params.MCS(17).CR = 1/2;
wifi_params.MCS(17).M = 2; % BPSK
wifi_params.MCS(17).hmod = modem.pskmod('M', 2, 'InputType', 'bit');
wifi_params.MCS(17).hdemod = modem.pskdemod('M', 2, 'OutputType', 'bit', 'DecisionType', decType);
wifi_params.MCS(17).modNorm = 1;
% MCS 17 -------------------------------------------------------------------
wifi_params.MCS(18).N_ss = 3;
wifi_params.MCS(18).decType = decType;
wifi_params.MCS(18).MCS = 'MCS17';
wifi_params.MCS(18).CR = 1/2;
wifi_params.MCS(18).M = 4; % QPSK
wifi_params.MCS(18).hmod = modem.pskmod('M', 4, 'InputType', 'bit', 'PhaseOffset', pi/4);
wifi_params.MCS(18).hdemod = modem.pskdemod('M', 4, 'OutputType', 'bit', 'PhaseOffset', pi/4, 'DecisionType', decType);
wifi_params.MCS(18).modNorm = 1;
% MCS 18 -------------------------------------------------------------------
wifi_params.MCS(19).N_ss = 3;
wifi_params.MCS(19).decType = decType;
wifi_params.MCS(19).MCS = 'MCS18';
wifi_params.MCS(19).CR = 3/4;
wifi_params.MCS(19).M = 4; % QPSK
wifi_params.MCS(19).hmod = modem.pskmod('M', 4, 'InputType', 'bit', 'PhaseOffset', pi/4);
wifi_params.MCS(19).hdemod = modem.pskdemod('M', 4, 'OutputType', 'bit', 'PhaseOffset', pi/4, 'DecisionType', decType);
wifi_params.MCS(19).modNorm = 1;
% MCS 19 -------------------------------------------------------------------
wifi_params.MCS(20).N_ss = 3;
wifi_params.MCS(20).decType = decType;
wifi_params.MCS(20).MCS = 'MCS19';
wifi_params.MCS(20).CR = 1/2;
wifi_params.MCS(20).M = 16; % 16QAM
wifi_params.MCS(20).hmod = modem.qammod('M', 16, 'InputType', 'bit');              % Modulator object
wifi_params.MCS(20).hdemod = modem.qamdemod('M', 16, 'OutputType','bit', 'DecisionType', decType);            % Demodulator object
wifi_params.MCS(20).modNorm = sqrt(10);
% MCS 20 -------------------------------------------------------------------
wifi_params.MCS(21).N_ss = 3;
wifi_params.MCS(21).decType = decType;
wifi_params.MCS(21).MCS = 'MCS20';
wifi_params.MCS(21).CR = 3/4;
wifi_params.MCS(21).M = 16; % 16QAM
wifi_params.MCS(21).hmod = modem.qammod('M', 16, 'InputType', 'bit');              % Modulator object
wifi_params.MCS(21).hdemod = modem.qamdemod('M', 16, 'OutputType','bit', 'DecisionType', decType);            % Demodulator object
wifi_params.MCS(21).modNorm = sqrt(10);
% MCS 21 -------------------------------------------------------------------
wifi_params.MCS(22).N_ss = 3;
wifi_params.MCS(22).decType = decType;
wifi_params.MCS(22).MCS = 'MCS21';
wifi_params.MCS(22).CR = 2/3;
wifi_params.MCS(22).M = 64; % 64QAM
wifi_params.MCS(22).hmod = modem.qammod('M', 64, 'InputType', 'bit');              % Modulator object
wifi_params.MCS(22).hdemod = modem.qamdemod('M', 64, 'OutputType','bit', 'DecisionType', decType);            % Demodulator object
wifi_params.MCS(22).modNorm = sqrt(42);
% MCS 22 -------------------------------------------------------------------
wifi_params.MCS(23).N_ss = 3;
wifi_params.MCS(23).decType = decType;
wifi_params.MCS(23).MCS = 'MCS22';
wifi_params.MCS(23).CR = 3/4;
wifi_params.MCS(23).M = 64; % 64QAM
wifi_params.MCS(23).hmod = modem.qammod('M', 64, 'InputType', 'bit');              % Modulator object
wifi_params.MCS(23).hdemod = modem.qamdemod('M', 64, 'OutputType','bit', 'DecisionType', decType);            % Demodulator object
wifi_params.MCS(23).modNorm = sqrt(42);
% MCS 23 -------------------------------------------------------------------
wifi_params.MCS(24).N_ss = 3;
wifi_params.MCS(24).decType = decType;
wifi_params.MCS(24).MCS = 'MCS23';
wifi_params.MCS(24).CR = 5/6;
wifi_params.MCS(24).M = 64; % 64QAM
wifi_params.MCS(24).hmod = modem.qammod('M', 64, 'InputType', 'bit');              % Modulator object
wifi_params.MCS(24).hdemod = modem.qamdemod('M', 64, 'OutputType','bit', 'DecisionType', decType);            % Demodulator object
wifi_params.MCS(24).modNorm = sqrt(42);
% Spatial streams number = 4 ==============================================
% MCS 24 -------------------------------------------------------------------
wifi_params.MCS(25).N_ss = 4;
wifi_params.MCS(25).decType = decType;
wifi_params.MCS(25).MCS = 'MCS24';
wifi_params.MCS(25).CR = 1/2;
wifi_params.MCS(25).M = 2; % BPSK
wifi_params.MCS(25).hmod = modem.pskmod('M', 2, 'InputType', 'bit');
wifi_params.MCS(25).hdemod = modem.pskdemod('M', 2, 'OutputType', 'bit', 'DecisionType', decType);
wifi_params.MCS(25).modNorm = 1;
% MCS 25 -------------------------------------------------------------------
wifi_params.MCS(26).N_ss = 4;
wifi_params.MCS(26).decType = decType;
wifi_params.MCS(26).MCS = 'MCS25';
wifi_params.MCS(26).CR = 1/2;
wifi_params.MCS(26).M = 4; % QPSK
wifi_params.MCS(26).hmod = modem.pskmod('M', 4, 'InputType', 'bit', 'PhaseOffset', pi/4);
wifi_params.MCS(26).hdemod = modem.pskdemod('M', 4, 'OutputType', 'bit', 'PhaseOffset', pi/4, 'DecisionType', decType);
wifi_params.MCS(26).modNorm = 1;
% MCS 26 -------------------------------------------------------------------
wifi_params.MCS(27).N_ss = 4;
wifi_params.MCS(27).decType = decType;
wifi_params.MCS(27).MCS = 'MCS26';
wifi_params.MCS(27).CR = 3/4;
wifi_params.MCS(27).M = 4; % QPSK
wifi_params.MCS(27).hmod = modem.pskmod('M', 4, 'InputType', 'bit', 'PhaseOffset', pi/4);
wifi_params.MCS(27).hdemod = modem.pskdemod('M', 4, 'OutputType', 'bit', 'PhaseOffset', pi/4, 'DecisionType', decType);
wifi_params.MCS(27).modNorm = 1;
% MCS 27 -------------------------------------------------------------------
wifi_params.MCS(28).N_ss = 4;
wifi_params.MCS(28).decType = decType;
wifi_params.MCS(28).MCS = 'MCS27';
wifi_params.MCS(28).CR = 1/2;
wifi_params.MCS(28).M = 16; % 16QAM
wifi_params.MCS(28).hmod = modem.qammod('M', 16, 'InputType', 'bit');              % Modulator object
wifi_params.MCS(28).hdemod = modem.qamdemod('M', 16, 'OutputType','bit', 'DecisionType', decType);            % Demodulator object
wifi_params.MCS(28).modNorm = sqrt(10);
% MCS 28 -------------------------------------------------------------------
wifi_params.MCS(29).N_ss = 4;
wifi_params.MCS(29).decType = decType;
wifi_params.MCS(29).MCS = 'MCS28';
wifi_params.MCS(29).CR = 3/4;
wifi_params.MCS(29).M = 16; % 16QAM
wifi_params.MCS(29).hmod = modem.qammod('M', 16, 'InputType', 'bit');              % Modulator object
wifi_params.MCS(29).hdemod = modem.qamdemod('M', 16, 'OutputType','bit', 'DecisionType', decType);            % Demodulator object
wifi_params.MCS(29).modNorm = sqrt(10);
% MCS 29 -------------------------------------------------------------------
wifi_params.MCS(30).N_ss = 4;
wifi_params.MCS(30).decType = decType;
wifi_params.MCS(30).MCS = 'MCS29';
wifi_params.MCS(30).CR = 2/3;
wifi_params.MCS(30).M = 64; % 64QAM
wifi_params.MCS(30).hmod = modem.qammod('M', 64, 'InputType', 'bit');              % Modulator object
wifi_params.MCS(30).hdemod = modem.qamdemod('M', 64, 'OutputType','bit', 'DecisionType', decType);            % Demodulator object
wifi_params.MCS(30).modNorm = sqrt(42);
% MCS 30 -------------------------------------------------------------------
wifi_params.MCS(31).N_ss = 4;
wifi_params.MCS(31).decType = decType;
wifi_params.MCS(31).MCS = 'MCS30';
wifi_params.MCS(31).CR = 3/4;
wifi_params.MCS(31).M = 64; % 64QAM
wifi_params.MCS(31).hmod = modem.qammod('M', 64, 'InputType', 'bit');              % Modulator object
wifi_params.MCS(31).hdemod = modem.qamdemod('M', 64, 'OutputType','bit', 'DecisionType', decType);            % Demodulator object
wifi_params.MCS(31).modNorm = sqrt(42);
% MCS 31 -------------------------------------------------------------------
wifi_params.MCS(32).N_ss = 3;
wifi_params.MCS(32).decType = decType;
wifi_params.MCS(32).MCS = 'MCS31';
wifi_params.MCS(32).CR = 5/6;
wifi_params.MCS(32).M = 64; % 64QAM
wifi_params.MCS(32).hmod = modem.qammod('M', 64, 'InputType', 'bit');              % Modulator object
wifi_params.MCS(32).hdemod = modem.qamdemod('M', 64, 'OutputType','bit', 'DecisionType', decType);            % Demodulator object
wifi_params.MCS(32).modNorm = sqrt(42);
% =========================================================================