Restore ordering of symbols using random permutation
deintrlvd = randdeintrlv(data,state)
deintrlvd = randdeintrlv(data,state) restores the original ordering of the elements in data by inverting a random permutation. The state parameter initializes the random number generator that the function uses to determine the permutation. state is either a scalar or a 35x1 vector, and is described in the rand function, which is used in randintrlv. The function is predictable for a given state, but different states produce different permutations. If data is a matrix with multiple rows and columns, the function processes the columns independently.
To use this function as an inverse of the randintrlv function, use the same state input in both functions. In that case, the two functions are inverses in the sense that applying randintrlv followed by randdeintrlv leaves data unchanged.
This function uses, by default, the Mersenne Twister algorithm by Nishimura and Matsumoto.
For an example using random interleaving and deinterleaving, see Improve Error Rate Using Block Interleaving in MATLAB.