Main Content

muxdeintrlv

Restore ordering of symbols using specified shift registers

Syntax

deintrlved = muxdeintrlv(data,delay)
[deintrlved,state] = muxdeintrlv(data,delay)
[deintrlved,state] = muxdeintrlv(data,delay,init_state)

Description

deintrlved = muxdeintrlv(data,delay)restores the ordering of elements indataby using a set of internal shift registers, each with its own delay value.delayis a vector whose entries indicate how many symbols each shift register can hold. The length ofdelayis the number of shift registers. Before the function begins to process data, it initializes all shift registers with zeros. Ifdatais a matrix with multiple rows and columns, the function processes the columns independently.

[deintrlved,state] = muxdeintrlv(data,delay)returns a structure that holds the final state of the shift registers.state.valuestores any unshifted symbols.state.indexis the index of the next register to be shifted.

[deintrlved,state] = muxdeintrlv(data,delay,init_state)initializes the shift registers with the symbols contained ininit_state.valueand directs the first input symbol to the shift register referenced byinit_state.index. The structureinit_stateis typically thestateoutput from a previous call to this same function, and is unrelated to the corresponding interleaver.

Using an Interleaver-Deinterleaver Pair

To use this function as an inverse of themuxintrlvfunction, use the samedelayinput in both functions. In that case, the two functions are inverses in the sense that applyingmuxintrlvfollowed bymuxdeintrlvleaves data unchanged, after you take their combined delay oflength(delay)*max(delay)into account. To learn more about delays of convolutional interleavers, seeDelays of Convolutional Interleavers.

Examples

The example below illustrates how to use the state input and output when invokingmuxdeintrlvrepeatedly. Notice that[deintrlved1; deintrlved2]is the same asdeintrlved.

delay = [0 4 8 12];% Delays in shift registers符号= 100;% Number of symbols to process% Interleave random data.intrlved = muxintrlv(randi([0 1],symbols,1),delay);% Deinterleave some of the data, recording state for later use.[deintrlved1,state] = muxdeintrlv(intrlved(1:symbols/2),delay);% Deinterleave the rest of the data, using state as an input argument.deintrlved2 = muxdeintrlv(intrlved(symbols/2+1:symbols),delay,state);% Deinterleave all data in one step.deintrlved = muxdeintrlv(intrlved,delay); isequal(deintrlved,[deintrlved1; deintrlved2])

The output is below.

ans = 1

Another example using this function is inConvolutional Interleaving and Deinterleaving Using a Sequence of Consecutive Integers in MATLAB.

References

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

版本历史

Introduced before R2006a

See Also

Topics