# nchoosek

Binomial coefficient or all combinations

## Description

returns the binomial coefficient for the number of combinations of
`b`

= nchoosek(`n`

,`k`

)`n`

items taken `k`

at a time. The binomial
coefficient is defined as

$${}_{n}C{\text{\hspace{0.17em}}}_{k}=\left(\begin{array}{c}n\\ k\end{array}\right)=\frac{n!}{\left(n-k\right)!\text{\hspace{0.17em}}\text{\hspace{0.17em}}k!}\text{\hspace{0.17em}}.$$

`n`

and `k`

must be nonnegative
integers.

## Examples

## Input Arguments

## Output Arguments

## Limitations

When

`b = nchoosek(n,k)`

is sufficiently large,`nchoosek`

displays a warning that the result might not be exact. In this case, the result is only accurate to 15 digits for double-precision inputs, or 8 digits for single-precision inputs.`C = nchoosek(v,k)`

is only practical for situations where`length(v)`

is less than about`15`

.

## Extended Capabilities

## Version History

**Introduced before R2006a**