Dyadic (TweArgument) Form: Binomial AIB
The binomid function result is the number of different combinations of argument B
that can be taken A at a time. The result of A!B is also the (A+l)th coefficient of
the binomial expansion of the Bth power. The arguments can be numeric scalars,
vectors, or other arrays. The argument must be the same shape, unless one of the
arguments is a scalar or any single-element array. Arguments of the same shape
have the same shape result:
2!4
6
W X Y Z -Argument B
2 ! 6
is
a
1
3
3 ! (1
0 ! 3
2 ! 3
The combinations of
argument B taken
./
-
argument A(2) at a time
If one argument is a scalar or a single-element array, the shape of the result is the
same as that of the other argument. The single element is applied to every element
of the multielement array:
60
i/
.__
(bl
The ? Function: Roll
Monadic (One-Argument) Form: Roll 7B
The roll function result is a randomly selected integer from 0 through 6-1 or 1
through B (depending on the index origin). Each integer in the range has an equal
chance of being selected. The argument can be a positive integral scalar, vector, or
other array. The shape of the result is the same as that of the argument:
If the argument is an array, the function is extended to each element of the array:
Dyadic (Two-Argument) Form
See the Deal function later in this chapter under Primitive Mixed Functions.
61
Previous Page Next Page