nCk(n,k)
Versión 1.0.0.0 (830 Bytes) por
Eyal Ben-Hur
Vectorized version of nchoosek function for multiple k's
Returns the Binomial coefficient for each element in k for a given scalar n.
k may have any shape.
n must be scalar.
Example:
k = [4 5 6];
n = 10;
C = nCk(n,k)
C =
210 252 210
Citar como
Eyal Ben-Hur (2025). nCk(n,k) (https://www.mathworks.com/matlabcentral/fileexchange/61348-nck-n-k), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R2011a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
Más información sobre Constants and Test Matrices en Help Center y MATLAB Answers.
Etiquetas
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.0.0 | Added an example |