nCk(n,k)

Vectorized version of nchoosek function for multiple k's

Sie verfolgen jetzt diese Einreichung

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

Zitieren als

Eyal Ben-Hur (2026). nCk(n,k) (https://de.mathworks.com/matlabcentral/fileexchange/61348-nck-n-k), MATLAB Central File Exchange. Abgerufen .

Kategorien

Mehr zu Constants and Test Matrices finden Sie in Help Center und MATLAB Answers

Allgemeine Informationen

Kompatibilität der MATLAB-Version

  • Kompatibel mit allen Versionen

Plattform-Kompatibilität

  • Windows
  • macOS
  • Linux
Version Veröffentlicht Versionshinweise Action
1.0.0.0

Added an example