Надеюсь, это поможет,
повторная выборка с заменой:
input=[2 3 4 2 3 4];
len=size(input,2);
number_of_permutations=10;
rand_idx=randi(len,1,len*number_of_permutations);
permutation_matrix=zeros(len,number_of_permutations);
permutation_matrix(:)=input(rand_idx);
permutation_matrix=permutation_matrix';
это повторная выборка без замены
input=[2 3 4 2 3 4];
len=size(input,2);
number_of_permutations=10;
rand_idx=repmat(randperm(len,len),1,number_of_permutations);
permutation_matrix=zeros(len,number_of_permutations);
permutation_matrix(:)=input(rand_idx);
permutation_matrix=permutation_matrix';