nCk(n,k)
Version 1.0.0.0 (830 octets) par
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
Citation pour cette source
Eyal Ben-Hur (2024). nCk(n,k) (https://www.mathworks.com/matlabcentral/fileexchange/61348-nck-n-k), MATLAB Central File Exchange. Récupéré le .
Compatibilité avec les versions de MATLAB
Créé avec
R2011a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS LinuxCatégories
En savoir plus sur Constants and Test Matrices dans Help Center et MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
Version | Publié le | Notes de version | |
---|---|---|---|
1.0.0.0 | Added an example |