Set UL-SCH Parameters in Structure Array
This example shows how to parameterize an UL-SCH or PUSCH-specific parameter structure using two different representations. Consider creating a parameter structure for the lteULSCHDeinterleave function.
When UCI is being transmitted on the UL-SCH, the deinterleaving and UCI demultiplexing operations require explicit knowledge of number of control channel symbols within the codeword. For example, for a single LTE Release 8 codeword, the UL-SCH specific parameters can be defined by a scalar (1-by-1) structure.
ulsch1.Modulation = 'QPSK'; ulsch1.QdCQI = 4; ulsch1.QdRI = 2; ulsch1.QdACK = 2;
The UL-SCH-specific structure also allows each codeword to be defined by separate, independent elements of a 1-by-2 structure array. In this case, the important distinction is that no parameter field values are implicitly shared between the codewords. Each field value applies only to the codeword associated with that structure array element. For example, redefine the single codeword structure by creating a new 1-by-2 structure array containing two identical elements.
ulsch2(1:2) = ulsch1
ulsch2 = 1x2 struct array with fields: Modulation QdCQI QdRI QdACK
Update only the parameters which are different for each codeword.
ulsch2(1).QdCQI = 0; ulsch2(2).Modulation = '16QAM';
Add the explicit number of layers per codeword parameter, NLayers, to the elements of the structure array.
[ulsch2.NLayers] = deal(1,2);
View the first element of the final ulsch2 structure array.
ans = struct with fields: Modulation: 'QPSK' QdCQI: 0 QdRI: 2 QdACK: 2 NLayers: 1
View the second element of the final ulsch2 structure array.
ans = struct with fields: Modulation: '16QAM' QdCQI: 4 QdRI: 2 QdACK: 2 NLayers: 2
Both of these forms of UL-SCH parameter representation can be used in many of the UL-SCH- and PUSCH-related functions. In additional, the lteULSCHInfo function can return its output structure in either form:
- To receive a structure array, set the second element of the 1-by-2 opts cell array to 'cwseparate'.
- To receive a scalar structure, set it to 'cwcombined'.