nck
Versión 1.0.5 (27,6 KB) por
JaeHyeok Park
Efficient calculation of combination or binomial coefficient, without direct calculating factorials.
Efficient calculation of combination or binomial coefficient, without direct calculating factorials.
Currently, this module will not give very accurate result (see the discussion page below)
usage:
>> nck(7,5)
21
Inspired by python reduce implementation
modified using better alrorithm
Citar como
JaeHyeok Park (2024). nck (https://www.mathworks.com/matlabcentral/fileexchange/105320-nck), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R2021b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS LinuxEtiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.5 | changed description |
|
|
1.0.4 | merged multiply and divide calculation in one line |
|
|
1.0.3 | adopt method described in https://www.geeksforgeeks.org/space-and-time-efficient-binomial-coefficient/ |
|
|
1.0.2 | changed loop endpoint |
||
1.0.1 | minor change in description |
|
|
1.0.0 |
|