# mlseq

## Description

also specifies which primitive polynomials `S`

= mlseq(`N`

,`k`

)`k`

in a Galois field
*GF(2 ^{n})* to use. For each allowable sequence
length

*N*, the total number

*T*of primitive polynomials in

*GF(2*is given in the table Polynomial indices.

^{n})## Examples

## Input Arguments

## Output Arguments

## Algorithms

An MLS can be generated using a linear-feedback shift register. The taps of the register
are set according to the non-zero coefficients of a primitive polynomial over Galois field
*GF(2 ^{n})*. A primitive polynomial in

*GF(2*has a form

^{n})$$m(x)={x}^{n}+{c}_{n}{x}^{n-1}+{c}_{n-1}{x}^{n-2}+\mathrm{...}+{c}_{1}$$

where *c _{i}* is a length-

*n*vector of coefficients. The entries of

*c*can either be 0 or 1 and can be interpreted as an integer in a binary form (MSB corresponds to the power of

_{i}*n-1*). An MLS can then be generated using the recursion relation:

$${s}_{i}=\mathrm{mod}(-{c}_{n}{s}_{i-1}-{c}_{n-1}{s}_{i-2}-\mathrm{...}-{c}_{1}{s}_{i-n},2)$$

The first *n* elements of the sequence

$$({s}_{1},{s}_{2},\mathrm{...},{s}_{n})$$

can be supplied as an initial condition in order to initiate the recursion.
Choosing different initial conditions will result in different final sequences that are cyclic
shifts of each other. There are total *N=2 ^{n}-1*
possible initial conditions. The initial conditions can be represented as binary integers from
1 to

*N*with the LSB corresponding to

*s*. The final step in generating the sequence to replacing the "0" entries with "-1". For a given

_{1}*n*there can be multiple primitive polynomials in

*GF(2*resulting in different sequences. By default, the function returns a sequence having the lowest autocorrelation sidelobes.

^{n})## References

[1] Levanon, N. and E. Mozeson.
*Radar Signals*. Hoboken, NJ: John Wiley & Sons,
2004.

[2] Haderer, Heinz, Reinhard Feger,
and Andreas Stelzer. "A comparison of phase-coded CW radar modulation schemes for integrated
radar sensors" in *2014 44th European Microwave Conference*, pp.
1896-1899. IEEE, 2014.

## Extended Capabilities

## Version History

**Introduced in R2024a**