Permute symbols using shift registers with specified delays
intrlved = muxintrlv(data,delay)
[intrlved,state] = muxintrlv(data,delay)
[intrlved,state] = muxintrlv(data,delay,init_state)
intrlved = muxintrlv(data,delay) permutes the elements in data by using internal shift registers, each with its own delay value. delay is a vector whose entries indicate how many symbols each shift register can hold. The length of delay is the number of shift registers. Before the function begins to process data, it initializes all shift registers with zeros. If data is a matrix with multiple rows and columns, the function processes the columns independently.
[intrlved,state] = muxintrlv(data,delay) returns a structure that holds the final state of the shift registers. state.value stores any unshifted symbols. state.index is the index of the next register to be shifted.
[intrlved,state] = muxintrlv(data,delay,init_state) initializes the shift registers with the symbols contained in init_state.value and directs the first input symbol to the shift register referenced by init_state.index. The structure init_state is typically the state output from a previous call to this same function, and is unrelated to the corresponding deinterleaver.
The examples in Convolutional Interleaving and Deinterleaving Using a Sequence of Consecutive Integers in MATLAB and on the reference page for the convintrlv function use muxintrlv.
The example on the reference page for muxdeintrlv illustrates how to use the state output and init_state input with that function; the process is analogous for this function.
 Heegard, Chris, and Stephen B. Wicker, Turbo Coding, Boston, Kluwer Academic Publishers, 1999.