function[f,g]=barriento(x)
n=10;%dimensión de x
m=5;%número de funciones
Q=zeros(n,n,m);
c=zeros(n,m);
for j=1:m,
   for i=1:n,
  	 for  k=i+1:n,
	  Q(i,k,j)=exp(i/k)*cos(i/k)*sin(j);
	  Q(k,i,j)=Q(i,k,j);
	 end
	   q=0;
	   for k=1:n,
		q=q+Q(i,k,j);
	   end
	Q(i,i,j)=i/n*abs(sin(j))+q;
	c(i,j)=exp(i/j)*sin(i*j);
   end
end
 h=zeros(n,m);                % vector renglon de  n elementos
% x=ones(n,1);                 % vector columna de n elementos

for j=1:m,
   h(:,j)=Q(:,:,j)*x-c(:,j);
   f(j)=x'*h(:,j);
end
%f(1)= x(1)^2+x(2)^4;
%f(2)= (2-x(1))^2+(2-x(2))^2;
%f(3)= 2*exp(-x(1)+x(2));
g=[];

