%% Factorial of Array Elements

n = [0 1 2; 3 4 5];
f = factorial(n)

% Copyright 2012 The MathWorks, Inc.