>> b = [1,5,2,8,6,11,7,9,3,10];
>> idx = ~ismember(b,[1,2,6,7,9,10]);
>> mat = repmat(b,factorial(nnz(idx)),1);
>> mat(:,idx) = perms(b(idx))
mat =
1 11 2 8 6 5 7 9 3 10
1 11 2 8 6 3 7 9 5 10
1 11 2 5 6 8 7 9 3 10
1 11 2 5 6 3 7 9 8 10
1 11 2 3 6 8 7 9 5 10
1 11 2 3 6 5 7 9 8 10
1 8 2 11 6 5 7 9 3 10
1 8 2 11 6 3 7 9 5 10
1 8 2 5 6 11 7 9 3 10
1 8 2 5 6 3 7 9 11 10
1 8 2 3 6 11 7 9 5 10
1 8 2 3 6 5 7 9 11 10
1 5 2 11 6 8 7 9 3 10
1 5 2 11 6 3 7 9 8 10
1 5 2 8 6 11 7 9 3 10
1 5 2 8 6 3 7 9 11 10
1 5 2 3 6 11 7 9 8 10
1 5 2 3 6 8 7 9 11 10
1 3 2 11 6 8 7 9 5 10
1 3 2 11 6 5 7 9 8 10
1 3 2 8 6 11 7 9 5 10
1 3 2 8 6 5 7 9 11 10
1 3 2 5 6 11 7 9 8 10
1 3 2 5 6 8 7 9 11 10
Best Answer