clear;
 clc;
sdpvar x n h
sdpvar pc0 pc1 pc2 pc3 pc4 pc5 pc6 pc7 pc8 pc9
sdpvar v1 v2 v3 v4 v5 v6 v7 v8
sdpvar u1
FeasibilityConstraints=[sos(pc0+pc1*(x)+pc2*(n)+pc3*(h)+pc4*(x)*(x)+pc5*(x)*(n)+pc6*(x)*(h)+pc7*(n)*(n)+pc8*(n)*(h)+pc9*(h)*(h)-(282.507*x)+v1*(n-0)+v2*(n-0)*x+v3*(n-0)*n+v4*(n-0)*h),...
sos(h-(pc0+pc1*(x)+pc2*(n)+pc3*(h)+pc4*(x)*(x)+pc5*(x)*(n)+pc6*(x)*(h)+pc7*(n)*(n)+pc8*(n)*(h)+pc9*(h)*(h))+v5*(n-=x)+v6*(n-=x)*x+v7*(n-=x)*n+v8*(n-=x)*h),...
sos(0.683*(pc0+pc1*(x)+pc2*(n+1)+pc3*(h)+pc4*(x)*(x)+pc5*(x)*(n+1)+pc6*(x)*(h)+pc7*(n+1)*(n+1)+pc8*(n+1)*(h)+pc9*(h)*(h))+ (1-0.683)*(pc0+pc1*(x)+pc2*(n+1)+pc3*(h)+pc4*(x)*(x)+pc5*(x)*(n+1)+pc6*(x)*(h)+pc7*(n+1)*(n+1)+pc8*(n+1)*(h)+pc9*(h)*(h))-(pc0+pc1*(x)+pc2*(n)+pc3*(h)+pc4*(x)*(x)+pc5*(x)*(n)+pc6*(x)*(h)+pc7*(n)*(n)+pc8*(n)*(h)+pc9*(h)*(h))-u1*(=x-n)),...
u1>=0];
options=sdpsettings('verbose',1,'solver','sedumi');
model = solvesos(FeasibilityConstraints,[ ],options,[pc0;pc1;pc2;pc3;pc4;pc5;pc6;pc7;pc8;pc9;v1;v2;v3;v4;v5;v6;v7;v8;u1]); 
 vpc0=value(pc0);  
 vpc1=value(pc1);  
 vpc2=value(pc2);  
 vpc3=value(pc3);  
 vpc4=value(pc4);  
 vpc5=value(pc5);  
 vpc6=value(pc6);  
 vpc7=value(pc7);  
 vpc8=value(pc8);  
 vpc9=value(pc9); 
cof_list = [vpc0,vpc1,vpc2,vpc3,vpc4,vpc5,vpc6,vpc7,vpc8,vpc9];
ref_list=(cof_list>10^-6).*cof_list;
L=ref_list(1)*1+ref_list(2)*(x)+ref_list(3)*(n)+ref_list(4)*(h)+ref_list(5)*(x)*(x)+ref_list(6)*(x)*(n)+ref_list(7)*(x)*(h)+ref_list(8)*(n)*(n)+ref_list(9)*(n)*(h)+ref_list(10)*(h)*(h)