MULTINOMIAL

版本 1.0.0.0 (884 字节) 作者: Mukhtar Ullah
Multinomial coefficients.
3.1K 次下载
更新时间 2005/1/31

无许可证

MULTINOMIAL(N, K1, K2, ..., Km) where N and Ki are numeric arrays of non-negative integers satisfying N = K1 + K2 + ... + Km, returns the multinomial coefficient N!/( K1!* K2! ... *Km!).

MULTINOMIAL(N, [K1 K2 ... Km]) when Ki's are all scalar, returns the same as MULTINOMIAL(N, K1, K2, ..., Km).

Non-integer input arguments are pre-rounded by FLOOR function.

EXAMPLES:
multinomial(8, 2, 6) returns 28
binomial(8, 2) returns 28

multinomial(8, 2, 3, 3) returns 560
multinomial(8, [2, 3, 3]) returns 560

multinomial([8 10], 2, [6 8]) returns [28 45]

引用格式

Mukhtar Ullah (2024). MULTINOMIAL (https://www.mathworks.com/matlabcentral/fileexchange/6156-multinomial), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R14
兼容任何版本
平台兼容性
Windows macOS Linux
致谢

启发作品: Multinomial Expansion

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0

a minor improvement: replace round with floor