FUNCTION REFERENCE

factorial

Factorial of nonnegative integers.

Factorial of nonnegative integers.

Syntax

y = factorial(n)

Elementwise n!. Values for n above 170 are Inf.

Example

factorial(5)   % 120

Differences from MATLAB: Real double and logical input only.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.