Difference between revisions of "BinomialCoefficient Command"
From GeoGebra Manual
m (Text replace - ";(.*)\[(.*)\]" to ";$1($2)") |
(command syntax: changed [ ] into ( )) |
||
Line 2: | Line 2: | ||
;BinomialCoefficient( <Number>, <Number> ) | ;BinomialCoefficient( <Number>, <Number> ) | ||
:Calculates the binomial coefficient <math> n \choose r </math>. The first Number represents all elements ''n'' and the second Number represents the selected elements ''r''. | :Calculates the binomial coefficient <math> n \choose r </math>. The first Number represents all elements ''n'' and the second Number represents the selected elements ''r''. | ||
− | :{{example|1= | + | :{{example|1=<code><nowiki>BinomialCoefficient(5, 3)</nowiki></code> yields ''10''.}} |
:{{hint|1= | :{{hint|1= | ||
If your input in the [[File:Menu view cas.svg|link=|16px]] [[CAS View]] contains undefined variables, then this command yields a formula for the binomial coefficient. | If your input in the [[File:Menu view cas.svg|link=|16px]] [[CAS View]] contains undefined variables, then this command yields a formula for the binomial coefficient. | ||
− | ::{{example|1= | + | ::{{example|1=<code><nowiki>BinomialCoefficient(n, 3)</nowiki></code> yields <math>\frac{n^{3} - 3 n^{2} + 2 n}{6}</math>.}} |
}} | }} | ||
{{Note|1= See also [[nPr Command|NPr command]].}} | {{Note|1= See also [[nPr Command|NPr command]].}} |
Latest revision as of 11:07, 11 October 2017
- BinomialCoefficient( <Number>, <Number> )
- Calculates the binomial coefficient n \choose r . The first Number represents all elements n and the second Number represents the selected elements r.
- Example:
BinomialCoefficient(5, 3)
yields 10.
- Hint: If your input in the CAS View contains undefined variables, then this command yields a formula for the binomial coefficient.
- Example:
BinomialCoefficient(n, 3)
yields \frac{n^{3} - 3 n^{2} + 2 n}{6}.
Note: See also NPr command.