Function File: y = convenc (msg, t)
Function File: y = convenc (msg, t, punct)
Function File: y = convenc (msg, t, punct, s0)
Function File: [y, state_end] = convenc (…)

Encode the binary vector msg with the convolutional encoder described by the trellis structure t.

The rate k/n convolutional encoder encodes k bits at a time from the input vector and produces n bits at a time into the output vector. The input msg must have a length that is a multiple of k.

If the initial state s0 is specified, it indicates the internal state of the encoder when the first k input bits are fed in. The default value of s0 is 0.

The optional output argument state_end indicates the internal state of the encoder after the last bits are encoded. This allows the state of the encoder to be saved and applied to the next call to convenc to process data in blocks.

See also: poly2trellis.

Package: communications