%----------------------------------
% script combinatorial
P = zeros(n,n);
P(:,1) = ones(n,1);
for i = 2:n
   for j = 2:i
      P(i,j) = P(i-1,j-1)+P(i-1,j);
   end
end
%----------------------------------
