function f = fact(n,t) if (n < 1) f = 1; else f = (t-n+1) * fact(n - 1,t); end end