Permutations Of An Array Matlab. If x is<=10, then it s possible with 'perms' function.