how get it?

4 visualizzazioni (ultimi 30 giorni)
huda nawaf
huda nawaf il 18 Set 2011
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

Risposte (2)

bym
bym il 18 Set 2011
combnk('abcdefgh',3)
  2 Commenti
huda nawaf
huda nawaf il 18 Set 2011
thank you very much
bym
bym il 18 Set 2011
Andrei's answer works the same; please accept one

Accedi per commentare.


Andrei Bobrov
Andrei Bobrov il 18 Set 2011
nchoosek(x,3)
  1 Commento
Fangjun Jiang
Fangjun Jiang il 18 Set 2011
Remember to assign x as x='abcdefgh'

Accedi per commentare.

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by