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
Mischa Kim 2014 年 6 月 2 日
編集済み: Mischa Kim 2014 年 6 月 2 日

1 投票

Hello, use nchoosek
A = [1,2,3,4,5,6];
subsA = nchoosek(A,4)
for four elements, for example.
math search
math search 2014 年 6 月 2 日

0 投票

Thank you for the reply.

カテゴリ

ヘルプ センター および File ExchangeDiscrete Math についてさらに検索

質問済み:

2014 年 6 月 2 日

回答済み:

2014 年 6 月 2 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by