function y = combinations (n, k)
% COMBIN combination
%	y = combin (n,k)
%	calculates the number of possible combinations of 'k' in a set of 'n'
% 	elements

if (n < k)
	error ('n < k !');
end

y = 1;
for m = 1 : k
    y = y * (n-m+1)/m;
end
