%% Deprecode PHICH symbols2
% This example shows the deprecoding of a set of physical HARQ indicator channel (PHICH) symbols for reference measurement channel (RMC) R.11.
% Initialize a cell-wide parameter configuration structure, enb, for RMC R.11.

rc = 'R.11';
enb = lteRMCDL(rc);
nLayers = enb.PDSCH.NLayers;

%
% Generate an arbitrary set of input symbols as the PHICH symbols.

phichSym = reshape(lteSymbolModulate(randi([0,1],40*nLayers*2,1), ...
    'QPSK'),40,nLayers);

%
% Precode the PHICH symbols using normal cyclic prefix (setting for enb.CyclicPrefix as per R.11) and PHICH group 1.

nGroup = 1;
precodedSym = ltePHICHPrecode(phichSym,enb.CyclicPrefix,nGroup);

%
% Deprecode the precoded PHICH symbols using normal cyclic prefix and PHICH group 1.

out = ltePHICHDeprecode(precodedSym,enb.CyclicPrefix,nGroup);

%
% Check PHICH symbols vs. deprecoded PHICH symbols.

isequal(phichSym,out)

% Copyright 2012 The MathWorks, Inc.