Computes the factorial. |
||
Syntax |
fact = factorial(A) |
|
Argument |
Name |
Description |
|
A |
A scalar or a matrix. |
Output |
Name |
Description |
|
fact |
The factorial of each entry. |
Example |
Find the factorial of elements in a matrix. |
|
|
Syntax |
|
|
fact1 = factorial(5) fact2 = factorial([3,4]) |
|
|
Result |
|
|
fact1 will return 120 fact2 will return 6 24 |