I want to create a list of vectors, where the elements of each vector in the list sums up to the loop variable without considering order of elements and repetition into account. For eg.
k=1, list ={[1]};
k=2, list ={[1,1],[2]};
k=3, list ={[1,1,1],[1,2],[2,1],[3]};
k=4, list ={[1,1,1,1],[1,3],[3,1],[2,2],[2,1,1],[1,2,1],[1,1,2],[4]};
and so on. The length of the list is $2^{k-1}$. Is there any easy strategy to do this in MATLAB?