summaryrefslogtreecommitdiff
path: root/sharedfiles/fact.m
blob: b7f7cb2694bc31e38e3132d4e1eabc9779f56d61 (plain)
1
2
3
4
5
6
7
8
9
10
% Vector form of factorial.
% For some reason the function "factorial" can't act on vectors.
% 6/24/03

function y=fact(x);

y=[];
for s=1:length(x)
    y(s)=factorial(x(s));
end