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+pc12*(x)*(x)*(n-1)+pc13*(x)*(y)*(y)+pc14*(x)*(y)*(n-1)+pc15*(x)*(n-1)*(n-1)+pc16*(y)*(y)*(y)+pc17*(y)*(y)*(n-1)+pc18*(y)*(n-1)*(n-1)+pc19*(n-1)*(n-1)*(n-1)+pc20*(x)*(x)*(x)*(x)+pc21*(x)*(x)*(x)*(y)+pc22*(x)*(x)*(x)*(n-1)+pc23*(x)*(x)*(y)*(y)+pc24*(x)*(x)*(y)*(n-1)+pc25*(x)*(x)*(n-1)*(n-1)+pc26*(x)*(y)*(y)*(y)+pc27*(x)*(y)*(y)*(n-1)+pc28*(x)*(y)*(n-1)*(n-1)+pc29*(x)*(n-1)*(n-1)*(n-1)+pc30*(y)*(y)*(y)*(y)+pc31*(y)*(y)*(y)*(n-1)+pc32*(y)*(y)*(n-1)*(n-1)+pc33*(y)*(n-1)*(n-1)*(n-1)+pc34*(n-1)*(n-1)*(n-1)*(n-1))-u5*(n-0)-u6*(y-0)-u7*(n-0)*(y-0)),...
u1>=0, u2>=0, u3>=0, u4>=0, u5>=0, u6>=0, u7>=0];
options=sdpsettings('verbose',1,'solver','sedumi');
solvesos(FeasibilityConstraints,[ ],options,[pc0;pc1;pc2;pc3;pc4;pc5;pc6;pc7;pc8;pc9;pc10;pc11;pc12;pc13;pc14;pc15;pc16;pc17;pc18;pc19;pc20;pc21;pc22;pc23;pc24;pc25;pc26;pc27;pc28;pc29;pc30;pc31;pc32;pc33;pc34;v1;v2;v3;v4;v5;v6;v7;v8;u1;u2;u3;u4;u5;u6;u7]) 
 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)  
 vpc10=value(pc10)  
 vpc11=value(pc11)  
 vpc12=value(pc12)  
 vpc13=value(pc13)  
 vpc14=value(pc14)  
 vpc15=value(pc15)  
 vpc16=value(pc16)  
 vpc17=value(pc17)  
 vpc18=value(pc18)  
 vpc19=value(pc19)  
 vpc20=value(pc20)  
 vpc21=value(pc21)  
 vpc22=value(pc22)  
 vpc23=value(pc23)  
 vpc24=value(pc24)  
 vpc25=value(pc25)  
 vpc26=value(pc26)  
 vpc27=value(pc27)  
 vpc28=value(pc28)  
 vpc29=value(pc29)  
 vpc30=value(pc30)  
 vpc31=value(pc31)  
 vpc32=value(pc32)  
 vpc33=value(pc33)  
 vpc34=value(pc34) 