factorial

Factorial function.

Syntax

n=factorial(k)

Inputs

k
Type: integer
Dimension: scalar | vector | matrix

Outputs

n
Factorial values.
Type: integer
Dimension: scalar | vector | matrix

Examples

Single value example:
n = factorial(5)
n = 120
Matrix example:
n = factorial([4, 5; 6, 7])
n = [Matrix] 2 x 2
 24   120
720  5040