show all possible combination

dear all.
combination(28,4) is 20475. then how to show all of the 20475 combination. n the output matlab is notpad (dat or txt). i use matlab 2012a.
  • sorry, my englis is not good.

1 件のコメント

soni
soni 2014 年 10 月 3 日
28 is 1,2,3...28

サインインしてコメントする。

 採用された回答

José-Luis
José-Luis 2014 年 10 月 3 日
編集済み: José-Luis 2014 年 10 月 3 日

0 投票

C = nchoosek(1:28,4);
To save please read the documentation on save
doc save %-ascii option
Alternatively
doc dlmwrite
Please accept the answer that best solves your problem.

3 件のコメント

soni
soni 2014 年 10 月 3 日
編集済み: soni 2014 年 10 月 3 日
thank sir. but what if the 28 value is (01 2 3 4 5 6 2 3 4 5 6 7 4 5 6 7 8 6 7 8 9 8 9 10 10 11 12);
José-Luis
José-Luis 2014 年 10 月 3 日
vals = [0 1 2 3 4 5 6 2 3 4 5 6 7 4 5 6 7 8 6 7 8 9 8 9 10 10 11 12];
result = vals(C);
soni
soni 2014 年 10 月 3 日
problem with my matlab. can u upload txt file(result)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLarge Files and Big Data についてさらに検索

質問済み:

2014 年 10 月 3 日

コメント済み:

2014 年 10 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by