Produce the parity check and generator matrix of a cyclic code. The parity
check matrix is returned as a m by n matrix, representing the
[n,k] cyclic code. m is the order of the generator
polynomial p and the message length k is given by
n - m
.
The generator polynomial can either be a vector of ones and zeros, and length m representing,
p(1) + p(2) * x + p(3) * x^2 + ... + p(m) * x^(m-1)
The terms of the polynomial are stored least-significant term first. Alternatively, p can be an integer representation of the same polynomial.
The form of the parity check matrix is determined by typ. If typ is ’system’, a systematic parity check matrix is produced. If typ is ’nosys’ and non-systematic parity check matrix is produced.
If requested cyclgen
also returns the k by n generator
matrix g.
See also: hammgen, gen2par, cyclpoly.
Package: communications