A = [ 2 0 0; 1 0 1; 1 2 1; -1 0 0; 0 -1 0; 0 0 -1];
B = [5;2;10;-1;-2;1];
Aeq = [2 -2 1; 10 8 -14; -4 5 -6];
Beq = [-2; 26; 6];
x0 =[0.5; 2.5; 1.0];
x=fmincon(@myfun1,x0,A,B,Aeq,Beq)
