This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


Restore ordering of symbols


deintrlvd = deintrlv(data,elements)


deintrlvd = deintrlv(data,elements) restores the original ordering of the elements of data by acting as an inverse of intrlv. If data is a length-N vector or an N-row matrix, elements is a length-N vector that permutes the integers from 1 to N. To use this function as an inverse of the intrlv function, use the same elements input in both functions. In that case, the two functions are inverses in the sense that applying intrlv followed by deintrlv leaves data unchanged.


The code below illustrates the inverse relationship between intrlv and deintrlv.

p = randperm(10); % Permutation vector
a = intrlv(10:10:100,p); % Rearrange [10 20 30 ... 100].
b = deintrlv(a,p) % Deinterleave a to restore ordering.

The output is

b =

    10    20    30    40    50    60    70    80    90   100

More About

See Also

Introduced before R2006a

Was this topic helpful?