how get it?

3 ビュー (過去 30 日間)
huda nawaf
huda nawaf 2011 年 9 月 18 日
hi, I got combination by: n! n_C_k = ---------- k!(n - k)!
8_C_3=56 for ex.:x=abcdefgh can I get 56 combination of x? i.e how get? abc abd abe . . . thanks in advance

回答 (2 件)

bym
bym 2011 年 9 月 18 日
combnk('abcdefgh',3)
  2 件のコメント
huda nawaf
huda nawaf 2011 年 9 月 18 日
thank you very much
bym
bym 2011 年 9 月 18 日
Andrei's answer works the same; please accept one

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


Andrei Bobrov
Andrei Bobrov 2011 年 9 月 18 日
nchoosek(x,3)
  1 件のコメント
Fangjun Jiang
Fangjun Jiang 2011 年 9 月 18 日
Remember to assign x as x='abcdefgh'

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

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by