Thanks....

I've worked on it this morning and I have this: Code:

function L = perms(n)
row = 1;
Z = zeros(factorial(n),3);
for i=1:n
for j=2:n
for k=3:n
Z(row,:) = [i,j,k];
row = row + 1;
end
end
end
end

And it gives

Code:

perms3(3)
ans =
1 2 3
1 3 3
2 2 3
2 3 3
3 2 3
3 3 3

What I need is Code:

ans =
1 2 3
1 3 2
2 1 3
2 3 1
3 1 2
3 2 1

So, I'm close, but no cigar yet. My methods may seem cumbersome, but I'm having to follow others guidelines.

Any more ideas? Your taking the time to help is appreciated!