out = nrSymbolModulate(in,mod)
maps the bit sequence in codeword in to complex modulation symbols
using modulation scheme mod and returns modulated symbols. The function
implements TS 38.211 Section 5.1 [1].
out = nrSymbolModulate(in,mod,'OutputDataType',datatype)
specifies the data type of the modulated output symbols by using a name-value pair argument.
The function uses the specified data type for intermediate computations.
Generate a random sequence of binary values of length 20. Generate modulated symbols using QPSK modulation and specify single-precision data type for the output.
data = randi([0 1],20,1,'int8');
sym = nrSymbolModulate(data,'QPSK','OutputDataType','single');
in — Codeword to modulate column vector of binary values
Codeword to modulate, specified as a column vector of binary values. The codeword
length must be a multiple of the number of bits per symbol, specified by the modulation
scheme mod.
Modulation scheme, specified as 'pi/2-BPSK',
'BPSK', 'QPSK', '16QAM',
'64QAM', or '256QAM'. This modulation scheme
determines the modulation type to be performed on the input codeword and the number of
bits used per modulation symbol.
Modulation Scheme
Number of Bits Per Symbol
'pi/2-BPSK'
'BPSK'
1
'QPSK'
2
'16QAM'
4
'64QAM'
6
'256QAM'
8
Data Types: char | string
datatype — Data type of modulated output symbols 'double' (default) | 'single'
Data type of modulated output symbols, specified as 'double' or
'single'. The input argument datatype
determines the data type of the modulated output symbols and the data type that the
function uses for intermediate computations.
out — Modulated output symbols complex column vector
Modulated output symbols, returned as a complex column vector. The length of
out is the length of the codeword in divided
by the number of bits per symbol, specified by the modulation scheme
mod.
Data Types: double | single Complex Number Support: Yes
References
[1]
3GPP TS 38.211. “NR; Physical channels and
modulation.” 3rd Generation Partnership Project; Technical Specification Group
Radio Access Network.
Extended Capabilities
C/C++ Code Generation Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
Names
and values in name-value pair arguments must be compile-time constants. For example, to specify
single data type for the output, include
{coder.Constant('OutputDataType'),coder.Constant('single')} in the
-args value of the codegen function. For more
information, see the coder.Constant (MATLAB Coder) class.