Hi,
I want to create a permutation starting from a vector. For example:
V=[3 3 5]
I want every possible permutation considering values lower or equal to that of the each column, so that the first column can contain number from 1 to 3, the second from 1 to 3 and the third from 1 to 5, without repetitions. In this case:
1 1 1
2 1 1
3 1 1
1 2 1
2 2 1
3 2 1
1 3 1
2 3 1
3 3 1
1 1 2
2 1 2
3 1 2
….
3 3 5
Any suggestion on how to do that?
Thank you
Best Answer