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x)-u12*(x-0)*(y^2-0)-u13*(y^2-x)*(y^2-0)),...
u1>=0, u2>=0, u3>=0, u4>=0, u5>=0, u6>=0, u7>=0, u8>=0, u9>=0, u10>=0, u11>=0, u12>=0, u13>=0];
options=sdpsettings('verbose',1,'solver','sedumi');
model = 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;u1;u2;u3;u4;u5;u6;u7;u8;u9;u10;u11;u12;u13]); 
 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) 