필터 지우기
필터 지우기

statistics, discrete math, combinations question

조회 수: 2 (최근 30일)
Sean Smith
Sean Smith 2011년 9월 18일
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.

답변 (1개)

Andrei Bobrov
Andrei Bobrov 2011년 9월 18일
you want it?
n = 30;
k = 11;
out = prod(n-k+1:n)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by