I have a vector a = 1:8 and want all different combinations of these numbers where each number can only occur once in each row. So i want
and so on.
I've been stuck on this for hours, I have googled and used allcomb but that leads to rows like 11111118 and I can't seem to figure out how to only get the rows where each number is represented only once. Can anyone help me?