how to find subsets
이전 댓글 표시
Hi, if we have a set A={1,2,3,4,5,6} how can we find its subsets with four and five elements.
답변 (2개)
Mischa Kim
2014년 6월 2일
편집: Mischa Kim
2014년 6월 2일
Hello, use nchoosek
A = [1,2,3,4,5,6];
subsA = nchoosek(A,4)
for four elements, for example.
카테고리
도움말 센터 및 File Exchange에서 Discrete Math에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!