function z = S(x)
  %x : N x 10 matrix of decision variables
   N = size(x,1); % number of samples

 for i=1:N
   z(i) = 1000 - x(i,1)^2 - 2*(x(i,2)^2) - x(i,3)^2 - x(i,1)*x(i,2) - x(i,1)*x(i,3);
 end