Contents Previous Next Subchapters

The Factorial Function
Syntax factorl(n)
See Also gamma

Description
Computes the element-by-element factorial of n, where n is an integer matrix.

Example
If you enter
     n = [1, 2, 3, 4]
     factorl(n)
O-Matrix will respond
     [ 1 , 2 , 6 , 24 ]

Reference
The result is returned as an integer and hence should not be larger than INT_MAX . If you need to compute the factorial for a large value of n you should use gamma(n + 1).