Generate nchoosek vectors line-by-line
1 view (last 30 days)
I would like to interate through combinations according to the code,
combos = nchoosek(1:512,6);
for c = 1:size(combos,1)
However, the number of combinations, 2.4295e+13, is too big. Is there a way to generate the combinations line-by-line? I have no intention of running code for every single one, but I would like to index and get a specific combination for that index.