x=-2:0.1:2;
[X1,X2]=meshgrid(x,x);

[m,n]=size(X1);

S=[];
for i = 1:m
    for j = 1:n
        S(i,j) = fun_obj([X1(i,j) X2(i,j)]);
    end
end

% comentario
figure(1)
mesh(X1,X2,S); xlabel('x1'); ylabel('x2'); zlabel('S(x)');
title('Superficie S(x)');

figure(2)
c=contour(X1,X2,S); xlabel('x1'); ylabel('x2');
title('Curvas de Niveis de S(x)');

clabel(c);
