Generate binomial table

버전 1.2.0.0 (1.62 KB) 작성자: David Holdaway
Very simple function to generate a table of all possible binomial coefficients below a cut off
다운로드 수: 227
업데이트 날짜: 2012/1/17

라이선스 보기

Uses a recursion relation to generate all the binomial coefficients nchoosek(n,k) for a range n<=nmax, k<= n. This is much faster than using nchoosek to make this table.

The idea of this function is to be used when you have to evaluate large sums involving binomial coefficients, generating this table and sampling it would be much quicker than generating elements on the fly.

For this reason there is an inbuilt option that if the function is given two parameters it will generate a table of log(nchoosek) which is useful if it appears in summations where nchoosek may evaluate to inf.

인용 양식

David Holdaway (2024). Generate binomial table (https://www.mathworks.com/matlabcentral/fileexchange/34181-generate-binomial-table), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2011b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Descriptive Statistics and Visualization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.2.0.0

Edit: Modified recursion relation used to [n choose k] = [(n-1) choose k-1 ] + [n-1 choose k ] for ordinary table.

1.1.0.0

Edited normal recursion relation to be based on the sum [n choose k] = [(n-1) choose k-1 ] + [n choose k -1 ]
to avoid round errors

1.0.0.0