%% Decode CQI bits
% Decode encoded CQI bits.
% Create input stream and initialize channel settings structures for encoding and decoding. Encode CQI bits and turn logical bits into soft data. Decode the CQI bits.

cqi = [0; 1; 0; 1; 0; 1];

%

chsEnc.Modulation = 'QPSK';
chsEnc.QdCQI = 16;
chsEnc.NLayers = 1;

%

chsDec.NLayers = 1;
chsDec.OCQI = 6;

%

enc = lteCQIEncode(chsEnc,cqi);
enc = double(enc)-0.5;

%

rxCqi = lteCQIDecode(chsDec,enc)

% Copyright 2012 The MathWorks, Inc.