function z = S(x)
  %x : m x 10 matrix of decision variables
   m = size(x,1); % number of samples
 c=[-6.089 -17.164 -34.054 -5.914 -24.721 -14.986 -24.100 -10.708 -26.662 ...
	-22.179];
 for i=1:m
   z(i) =  sum(x(i,:).*(c+log(x(i,:)./sum(x(i,:)))));
 end