%% Perform OSFBC decoding of PDSCH symbols
% This example shows orthogonal space frequency block code (OSFBC) decoding of PDSCH symbols, using ideal channel estimates.
% Generate a resource grid using multiple antennas to transmit a single PDSCH codeword.

enb = lteRMCDL('R.11');
enb.TotSubframes = 1;
[~,txGrid] = lteRMCDLTool(enb,[1;0;0;1]);

%
% Extract the PDSCH symbols from this transmit grid

[ind,indInfo] = ltePDSCHIndices(enb,enb.PDSCH,enb.PDSCH.PRBSet);        
pdschSym = txGrid(ind);

%
% Create an ideal (identity) channel estimate

hest = permute(repmat(eye(enb.CellRefP),[1 1 indInfo.Gd]),[3 1 2]);

%
% Deprecode the PDSCH symbols using the channel estimates

[out,csi] = lteTransmitDiversityDecode(pdschSym,hest);

% Copyright 2012 The MathWorks, Inc.