k.m (view raw)
1function r = k(t, n, i) 2 r = 0; 3 for j = 0:min(i, t) 4 r = r + ((-1)^j * comb(i, j) * comb(n - i, t - j)); 5 end 6end