Effacer les filtres
Effacer les filtres

statistics, discrete math, combinations question

1 vue (au cours des 30 derniers jours)
Sean Smith
Sean Smith le 18 Sep 2011
I am just learning the nchoosek and factorial functions and had a question about 2 problems. The first is: how many different football teams of 11 players can you form from a class of 30 people? (combinations, order does not matter). For this I am guessing nchoosek(30,11) would find that. The second question is: since each player on the team is assigned a role, order does matter. Recalculate the number when order is taken into account. For this I am not sure what to do. I am guessing one of the questions uses factorial(30) or something but I am not sure and kind of lost. Thank You.

Réponses (1)

Andrei Bobrov
Andrei Bobrov le 18 Sep 2011
you want it?
n = 30;
k = 11;
out = prod(n-k+1:n)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by