Documentation of fact


Global Index (all files) (short | long) | Local Index (files in subdir) (short | long)


Function Synopsis

fac = fact(in);

Help text


  fac = fact(num);

  This is the same as num! .

  e.g., fact(5) = 5*4*3*2*1 etc.


Listing of function fact

function fac = fact(in);
if in == 0;
  fac = 1;
else
  fac = prod([1:in]);
end