| Contents | Index |
intrlvd = intrlv(data,elements)
intrlvd = intrlv(data,elements) rearranges the elements of data without repeating or omitting any elements. 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. The sequence in elements is the sequence in which elements from data or its columns appear in intrlvd. If data is a matrix with multiple rows and columns, the function processes the columns independently.
The command below rearranges the elements of a vector. Your output might differ because the permutation vector is random in this example.
p = randperm(10); % Permutation vector
a = intrlv(10:10:100,p)The output is below.
a =
10 90 60 30 50 80 100 20 70 40
The command below rearranges each of two columns of a matrix.
b = intrlv([.1 .2 .3 .4 .5; .2 .4 .6 .8 1]',[2 4 3 5 1])
b =
0.2000 0.4000
0.4000 0.8000
0.3000 0.6000
0.5000 1.0000
0.1000 0.2000

Learn how to apply early verification to your development process through these technical resources.
How much time do you spend on testing to ensure implementation meets system-level requirements?
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |