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