I have a number of vectors, probably with different lengths, e.g., a=[1 2 3], b=[4 5 6 7] and c=[8 9 10 11 12]. From a, b and c I have 3*4*5=60 possible points, e.g., one possibility is (1,4,8). If I know the number of vectors and the length of each vector in advance, this is easy to program. However, I want to write a general code that can find all these combinations regardless of the number of vectors and their individual lengths
MATLAB: How to pick up all combination of numbers from multiple vectors
cell arraysloopsMATLAB
Best Answer