Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Convert convolutional code polynomials to trellis description

`trellis = poly2trellis(ConstraintLength,CodeGenerator)`

trellis = poly2trellis(ConstraintLength,CodeGenerator,...

FeedbackConnection)

The `poly2trellis`

function accepts a polynomial
description of a convolutional encoder and returns the corresponding
trellis structure description. The output of `poly2trellis`

is
suitable as an input to the `convenc`

and `vitdec`

functions, and as a mask parameter
for the Convolutional Encoder, Viterbi Decoder, and APP Decoder blocks
in Communications
System Toolbox™ software.

`trellis = poly2trellis(ConstraintLength,CodeGenerator)`

performs
the conversion for a rate *k* / *n* feedforward
encoder. `ConstraintLength`

is a 1-by-*k* vector
that specifies the delay for the encoder's *k* input
bit streams. `CodeGenerator`

is a *k*-by-*n* matrix
of octal numbers or a *k*-by-*n* cell
array of polynomial character vectors that
specifies the *n* output connections for each of
the encoder's *k* input bit streams.

`trellis = poly2trellis(ConstraintLength,CodeGenerator,...`

is the same as the syntax
above, except that it applies to a feedback, not feedforward, encoder.

FeedbackConnection)`FeedbackConnection`

is
a 1-by-*k* vector of octal numbers that specifies
the feedback connections for the encoder's *k* input
bit streams.

For both syntaxes, the output is a MATLAB^{®} structure whose
fields are as in the table below.

**Fields of the Output Structure trellis for a
Rate k/n Code **

Field in trellis Structure | Dimensions | Meaning |
---|---|---|

`numInputSymbols` | Scalar | Number of input symbols
to the encoder: 2^{k} |

`numOutputSymbols` | Scalar | Number of output symbols
from the encoder: 2^{n} |

`numStates` | Scalar | Number of states in the encoder |

`nextStates` | `numStates` -by-2^{k} matrix | Next states for all combinations of current state and current input |

`outputs` | `numStates` -by-2^{k} matrix | Outputs (in octal) for all combinations of current state and current input |

For more about this structure, see the reference page for the `istrellis`

function.

Was this topic helpful?