function [x]=mark_opt(datenvektor,j,k,koschiefe)

x0 = 0.05*ones(j,1);   %starting vektor [0.2;0.2]
lb = 0.05*ones(j,1);      %lower boundaries [0;0];  0.15*ones(j,1);
ub=  ones(j,1);       %upper boundaries [1;1];
A=-datenvektor{1,k}{5,1}';
b=-0.05;
Aeq= ones(1,j);
beq= 1;

g=@(x)0;
for i=1:j
    g=@(x) (g(x)+x(i)^2*datenvektor{1,k}{3,1}(i,i));
end

%---------------------------------------------------------

h=@(x)0;
for i=1:(j-1)
    for p=(i+1):j
        h=@(x) (h(x)+2*x(i)*x(p)*datenvektor{1,k}{3,1}(i,p));
    end
end
%----------------------------------------------------------


z=@(x) (g(x)+h(x))^(1/2);
%----------------------------------------------------------
[x,fval,exitflag]=fmincon(z,x0,A,b,Aeq,beq,lb,ub,@(x) mycon(x, j, koschiefe)) ;


function [c ceq]=mycon(x,j,koschiefe)
%Nichtlineare Nebenbedingung

c=0;
for i=1:j
    for p=1:j
        for q=1:j
            c=c+((x(i)*x(p)*x(q)*koschiefe(i,p,q)));
        end
    end
end
ceq=[];
c=-c+0.3;










