BINOMIAL (Binomial coefficient.)

Binomial coefficient of arrays


Updated 20 Oct 2010

View License

BINOMIAL Binomial coefficient.

If the arguments are both non-negative integers with 0 <= K <= N, then
BINOMIAL(N, K) = N!/K!/(N-K)!, which is the number of distinct sets of
K objects that can be chosen from N distinct objects.
When N or K(or both) are N-D matrices, BINOMIAL(N, K) is the coefficient
for each pair of elements.

If N and K are integers that do not satisfy 0 <= K <= N, or N and K are
non-integers , then the general definition is used, that is


If N is a non-negative integer, BINOMIAL(N) = BINOMIAL(N, 0:N)

BINOMIAL only supports floating point input arguments.

Cite As

Mukhtar Ullah (2023). BINOMIAL (Binomial coefficient.) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Arithmetic Operations in Help Center and MATLAB Answers

Inspired: Monte Carlo Error Propagation

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

Code cleanup.

a minor improvement