partitions(n) returns the nth partition number, up to Matlab's largest integer capabilities.
examples: partitions(0) returns 1 and partitions(200) returns 3972999029388.
The algorithm used is due to Euler and is delineated in a video by Mathologer (the inspiration for this code).
引用格式
Douglas Brunson (2024). partitions (https://www.mathworks.com/matlabcentral/fileexchange/86277-partitions), MATLAB Central File Exchange. 检索来源 .
MATLAB 版本兼容性
创建方式
R2020b
兼容任何版本
平台兼容性
Windows macOS Linux标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!