nchoosek - non consecutive numbers
Show older comments
If have a set of 12 numbers (eg. 5, 7, 13, 14, 17, 18, 21, 24, 27, 35, 37, 39) and I would like to calculate a list of all the possible combinations of those numbers using only 7 of them. How would I do that? I don't care to know all the possible permutations of 7 numbers (that's the next step), just the combinations. Thank you.
Using C = m!/n!(m-n)! where m = 12 and n = 7 I know the result should yield a 7 X 792 matrix.
Accepted Answer
More Answers (0)
Categories
Find more on Elementary Math in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!