
function f = objfunl1(x)

%OBJFUNL provides the objective function evaluations needed for unifitl1nlp.m.

c = length(x);
n = round((1 + sqrt(1+3*c))/3)
nch2 = n*(n-1)/2;
iterindx = 0;



f = 0;
index = n;
for i = 2:n
   for j = 1:(i-1)
      index = index + 1;
      f = f + x(index+4*nch2)*(x(index) + x(index+nch2)) + ...
         x(index+5*nch2)*(x(index+2*nch2) + x(index+3*nch2));
   end
end
coord = zeros(n,1);

for i = 1:n
   coord(i) = x(i);
end