Combination (Function)
The Combination function calculates the number of unique combination groups for a given set of numbers.
Consider the following set of numbers: (1,2,3,4). There are 6 combinations of unique 2 number groups in the 4 number set; (1,2), (1,3), (1,4), (2,3), (2,4), and (3,4). So, Combination(4, 2) = 6.
Syntax
Combination(Num,NumChosen)
Returns (Integer)
A positive numeric value containing the total number of combination groups for a set of numbers for the current bar.
Parameters
Name |
Type |
Description |
Num |
Numeric |
The total number of items in the set to consider. |
NumChosen |
Numeric |
The number of unique items in each group. |
Remarks
The value for Num and NumChosen input parameters should be a positive whole number greater than 0.
Example
Assigns the number of unique 3 number groups in a set of 10 numbers to Value1:
Value1 = Combination(10,3);