MATLAB: How to generate combinations without storing them in an array

#nchoosekcombinatorialcombntns

I'm trying to generate all the combinations of the elements of a vector in Matlab. When the vector is of length greater than 20, the storage memory is insufficient, so if I work with the commands " c = nchoosek(v, k)" or "out = combntns (choicevec, choose)" I can not pass that limit. Is there any way to generate all the combinations that arise from these two commands without the need to be stored in an array?

Best Answer

Maybe this FEX submission "COMBINATOR -combinations AND permutations":
There is also a discussion on the topic here: