how to find subsets
34 views (last 30 days)
Show older comments
Hi, if we have a set A={1,2,3,4,5,6} how can we find its subsets with four and five elements.
0 Comments
Answers (2)
Mischa Kim
on 2 Jun 2014
Edited: Mischa Kim
on 2 Jun 2014
Hello, use nchoosek
A = [1,2,3,4,5,6];
subsA = nchoosek(A,4)
for four elements, for example.
0 Comments
See Also
Categories
Find more on Graphics Object Programming 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!