# algintrlv

Reorder symbols using algebraically derived permutation table

## Syntax

`intrlvd = algintrlv(data,num,`

`'takeshita-costello'`

,k,h)

intrlvd = algintrlv(data,num,`'welch-costas'`

,alph)

## Description

`intrlvd = algintrlv(data,num,`

rearranges the elements in `'takeshita-costello'`

,k,h)`data`

using a permutation table that is
algebraically derived using the Takeshita-Costello method. `num`

is the
number of elements in `data`

if `data`

is a vector, or
the number of rows of `data`

if `data`

is a matrix
with multiple columns. In the Takeshita-Costello method, `num`

must be
a power of 2. The multiplicative factor, `k`

, must be an odd integer
less than `num`

, and the cyclic shift, `h`

, must be a
nonnegative integer less than `num`

. If `data`

is a
matrix with multiple rows and columns, the function processes the columns
independently.

`intrlvd = algintrlv(data,num,`

uses the Welch-Costas method. In the Welch-Costas method, `'welch-costas'`

,alph)`num+1`

must
be a prime number. `alph`

is an integer between 1 and
`num`

that represents a primitive element of the finite field
GF(`num+1`

). This means that every nonzero element of
GF(`num+1`

) can be expressed as `alph`

raised to
some integer power.

## Examples

## Algorithms

A Takeshita-Costello interleaver uses a length-

`num`

cycle vector whose`n`

th element is`mod(k*(n-1)*n/2, num)`

for integers`n`

between 1 and`num`

. The function creates a permutation vector by listing, for each element of the cycle vector in ascending order, one plus the element's successor. The interleaver's actual permutation table is the result of shifting the elements of the permutation vector left by`h`

. (The function performs all computations on numbers and indices modulo`num`

.)A Welch-Costas interleaver uses a permutation that maps an integer

`K`

to`mod(A`

.^{K},num+1)-1

## References

[1] Heegard, Chris, and Stephen B. Wicker, *Turbo Coding*, Boston, Kluwer Academic Publishers,
1999.

[2] Takeshita, O. Y., and D. J. Costello,
Jr., “New Classes Of Algebraic Interleavers for Turbo-Codes,” *Proc.
1998 IEEE International Symposium on Information Theory*,
Boston, Aug. 16–21, 1998. p. 419.

## Extended Capabilities

## Version History

**Introduced before R2006a**