Main Content

helintrlv

R2026b

Permute symbols using helical matrix

Description

intrlvd = helintrlv(data,col,ngrp,stp) permutes the symbols in data by placing them in an internal matrix in helical fashion and then placing rows of the matrix in the output, intrlvd. For more information, see Helical Interleaving.

[intrlvd,state] = helintrlv(data,col,ngrp,stp) returns a structure that holds the final state of the internal matrix.

example

[intrlvd,state] = helintrlv(data,col,ngrp,stp,init_state) initializes the matrix with the symbols contained in init_state.value. The structure init_state is typically the state output from a previous call to this same function, and is unrelated to the corresponding deinterleaver. In this syntax, some output symbols are default values of 0, some are input symbols from data, and some are initialization values from init_state.value.

Examples

collapse all

Permute integers from 1 to 24 with helical Interleaving.

Define input variables for the internal computations.

col = 3;
ngrp = 4;
stp = 1;

Interleave twelve symbols and return the final state of the internal matrix.

[i1,state] = helintrlv([1:12]',3,4,1);

Display the values left in the internal three-column matrix after the first interleaving operation. The returned state output shows 8, 11, and 12 are values left in the matrix from the previous call to the function.

state.value{:}
ans =

     []
ans = 
8
ans = 1×2

    11    12

Specifying the init_state input in the second call to the function causes it to use those values rather than the default values of 0. Interleave twelve more symbols, inputting the final state for the symbols that were left in the internal matrix from the earlier command.

i2 = helintrlv([13:24]',3,4,1,state);

The interleaved output (transposed for display purposes) shows the interleaved data that comes from the top four rows of the internal three-column arrays. Some of the symbols in the first half of the interleaved data are default values of 0, some of the symbols (8, 11, 12) in the second half of the interleaved data were left in the matrix from the first call to helintrlv, and some of the input symbols (20, 23, and 24) do not appear in the interleaved data at all.

disp('Interleaved data:')
Interleaved data:
disp([i1,i2]')
     1     0     0     2     5     0     3     6     9     4     7    10
    13     8    11    14    17    12    15    18    21    16    19    22

Input Arguments

collapse all

Input signal to be interleaved, specified as a vector or matrix.

  • If data is a vector, it must have col×ngrp elements.

  • If data is a matrix with multiple rows and columns, data must have col×ngrp rows. The function processes the columns independently.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32
Complex Number Support: Yes

Number of columns in the temporary internal matrix, specified as a positive integer.

Number of symbols per group of rows used for helical interleaving, specified as a positive integer.

Number of symbols per group of rows used for helical interleaving, specified as a positive integer.

Initial state of registers, typically specified by using the state output from a previous call to this same function. The initial state of registers is unrelated to the corresponding deinterleaver.

Output Arguments

collapse all

Interleaved data, returned with the same dimensions and data type as the input data.

Final state of the shift registers after the previous call to this function, returned as a structure with these fields:

Unshifted symbols, returned as a vector containing input symbols that remain in the col columns of the internal matrix and do not appear in the output.

Index of the next register to be shifted, returned as a positive integer.

More About

collapse all

Version History

Introduced before R2006a