Main Content

ltePRBS

Pseudorandom binary sequence

Description

[seq,cinit] = ltePRBS(cinit,n) returns the first n elements of the pseudorandom binary sequence (PRBS) generator when initialized with cinit. For uniformity with the channel specific PRBS functions, ltePRBS also returns the initialization value cinit.

example

[seq,cinit] = ltePRBS(cinit,n,mapping) allows control over the format of the returned sequence seq with the input mapping.

example

[subseq,cinit] = ltePRBS(cinit,pn) returns a subsequence of a full PRBS sequence, specified by pn.

[subseq,cinit] = ltePRBS(cinit,pn,mapping) allows additional control over the format of the returned subsequence, subseq, with the input mapping.

Examples

collapse all

Generate a pseudorandom binary sequence based on physical layer cell identity for RMC R.0.

Create cell-wide configuration structure for RMC R.0. Use the physical layer cell identity, NCellID, as an initial value to generate the pseudorandom binary sequence.

enb = lteRMCDL('R.0');
prbsSeq = ltePRBS(enb.NCellID,5)
prbsSeq = 5x1 logical array

   0
   0
   0
   0
   0

Generate an unsigned pseudorandom binary sequence.

seq = ltePRBS(162,4);
seq(1:4)
ans = 4x1 logical array

   1
   0
   1
   1

Generate a signed pseudorandom binary sequence.

seq = ltePRBS(162,4,'signed');
seq(1:4)
ans = 4×1

    -1
     1
    -1
    -1

Input Arguments

collapse all

Initialization value, specified as a 32-bit integer.

Data Types: int32 | uint32 | double

Number of elements in returned sequence, seq, specified as a numeric scalar.

Data Types: double

Range of elements in returned subsequence, subseq, specified as a row vector of [p n]. The subsequence returns n values of the PRBS generator, starting at position p (0-based).

Data Types: double

Output sequence formatting, specified as 'binary' or 'signed'. mapping controls the format of the returned sequence.

  • 'binary' maps true to 1 and false to 0.

  • 'signed' maps true to –1 and false to 1.

Data Types: char | string

Output Arguments

collapse all

Pseudorandom binary sequence, returned as a logical column vector, or a numeric column vector. seq contains the first n values of the PRBS generator. If mapping is set to 'signed', seq is a vector of data type double. Otherwise, it is a vector of data type logical.

Data Types: logical | double

Pseudorandom binary subsequence, returned as a logical column vector, or a numeric column vector. subseq contains the values of the PRBS generator specified by pn. If you set mapping to 'signed', the output data type is double. Otherwise, the output data type is logical.

Data Types: logical | double

Version History

Introduced in R2014a