Main Content

nrSymbolModulate

Generate modulated symbols

Description

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].

example

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.

example

Examples

collapse all

Generate a random sequence of binary values of length 40. Generate modulated symbols using 16-QAM modulation.

data = randi([0 1],40,1);
sym = nrSymbolModulate(data,'16QAM');

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');

Input Arguments

collapse all

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.

Data Types: double | int8 | logical

Modulation scheme, specified as 'pi/2-BPSK', 'BPSK', 'QPSK', '16QAM', '64QAM', '256QAM', or '1024QAM'. This modulation scheme determines the modulation type to be performed on the input codeword and the number of bits used per modulation symbol.

Modulation SchemeNumber of Bits Per Symbol

'pi/2-BPSK'

'BPSK'

1
'QPSK'2
'16QAM'4
'64QAM'6
'256QAM'8
'1024QAM'10

Data Types: char | string

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.

Data Types: char | string

Output Arguments

collapse all

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

Version History

Introduced in R2018b

expand all