Library: | xplore |
See also: | cumprod |
Quantlet: | factorial | |
Description: | Computes the factorial for all values in an array. |
Usage: | m = factorial (n) | |
Input: | ||
n | array | |
Output: | ||
m | array containing the factorials |
library("xplore") randomize(0) x = 3*normal(2, 3) ~(0|0) factorial(x)
Contents of m [1,] 1 120 24 1 [2,] 6 6 2 1