%% Precode PHICH symbols
% This example shows precoding of an arbitrary set of PHICH symbols for reference measurement channel (RMC) R.11, PHICH group 1.
% 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 (set in enb.CyclicPrefix as per R.11), and PHICH group 1.

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

%
% Have a peek at the first 5 precoded symbols of the output, columns represent the number of transmit antennas, for this example there are two transmit antennas.

precodedSym(1:5, :)

% Copyright 2012 The MathWorks, Inc.