Documentation

This is machine translation

Mouseover text to see original. Click the button below to return to the English version of the page.

deintrlv

Restore ordering of symbols

Syntax

```deintrlvd = deintrlv(data,elements) ```

Description

`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.

Examples

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 ```