Constraint condition and IF statement

1 view (last 30 days)
hi all I need help to write a constraint condition used if statement as seen below i have error when put (if) after Ceq . how write it and sovled the error?
function [c,ceq]=bb12(x)
.
.
.
ceq=if (((0.025*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))) <=(0.5*x(7)-0.025)
x(9)=((13.91*((x(1)*(x(2)^2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))*(0.5*x(7)+((((0.025*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))))-0.025))/(0.9*1000*275*(x(7)-0.05)));
else if (((0.025*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))) > (0.5*x(7)-0.025)
x(9)=(((13.91*((x(1)*(x(2)^2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/0.9)+(0.85*35*1000*x(2)*0.411*(x(7)-0.025))+(x(10)*((600083*(0.411*(x(7)-0.025)-(0.85*0.025))/(0.411*(x(7)-0.025)))-(849.77*35))));
else
x(9)=(0.0025*x(7));
end
end;
Error:Illegal use of reserved keyword "if".
  2 Comments
James Tursa
James Tursa on 8 Jul 2015
What are c and ceq? They are returned from your function but it is not clear what they are supposed to be.
tahseen90 abd
tahseen90 abd on 9 Jul 2015
c :non liear inequalities constraint ceq :non liear equalities constraint what write the if condition and befor ceq=[

Sign in to comment.

Accepted Answer

Torsten
Torsten on 9 Jul 2015
function [c,ceq]=bb12(x)
a=(((0.025*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))))
if a<=(0.5*x(7)-0.025)
ceq=x(9)-((13.91*((x(1)*(x(2)^2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))*(0.5*x(7)+((((0.025*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))))-0.025))/(0.9*1000*275*(x(7)-0.05)));
else if a > (0.5*x(7)-0.025)
ceq=x(9)-(((13.91*((x(1)*(x(2)^2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/0.9)+(0.85*35*1000*x(2)*0.411*(x(7)-0.025))+(x(10)*((600083*(0.411*(x(7)-0.025)-(0.85*0.025))/(0.411*(x(7)-0.025)))-(849.77*35))));
end
Best wishes
Torsten.
  2 Comments
tahseen90 abd
tahseen90 abd on 9 Jul 2015
hello help me please if need more equation of non linear equalities constraint ceq=if (((0.025*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))) x(9)-((13.91*((x(1)*(x(2)^2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))*(0.5*x(7)+((((0.025*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))))-0.025))/(0.9*1000*275*(x(7)-0.05))) else if (((0.025*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))) > (0.5*x(7)-0.025) x(9)-(((13.91*((x(1)*(x(2)^2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/0.9)+(0.85*35*1000*x(2)*0.411*(x(7)-0.025))+(x(10)*((600083*(0.411*(x(7)-0.025)-(0.85*0.025))/(0.411*(x(7)-0.025)))-(849.77*35)))) else x(9)-(0.0025*x(7)) end if ((0.049*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))<=(0.5*x(7)-0.025) x(10)-((13.91*(((x(2)^2)*x(1))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))*(0.5*x(7)-0.025-((0.049*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))))/(0.9*275*1000*(x(7)-0.05))) else if ((0.049*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))(0.5*x(7)-0.025) x(10)-(((13.91*(((x(2)^2)*x(1))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))*(0.5*x(7)-0.025-((0.049*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))))/0.9)-(0.85*35*1000*x(2)*0.411*(x(7)-0.025)*(x(7)-0.025-(0.5*0.411*(x(7)-0.025)))))/(((600083*(0.411*(x(7)-0.025)-(0.85*0.025))/(0.411*(x(7)-0.025)))-(849.77*35))*(x(7)-0.05))) else x(10)-(0.0025*x(7)) end if ((0.098*(((x(2))^3)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/(x(1)*(1-exp((-1.025*x(3))/x(1)))))<=(0.5*x(7)-0.025) x(11)-((6.95*(x(1)^2)*(1-exp((-1.025*x(3))/x(1)))*(0.5*x(7)-0.025+(0.098*(((x(2))^3)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/(x(1)*(1-exp((-1.025*x(3))/x(1))))))/(0.9*1000*275*(x(7)-0.05))) else if ((0.098*(((x(2))^3)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/(x(1)*(1-exp((-1.025*x(3))/x(1)))))>(0.5*x(7)-0.025) x(11)-((((6.95*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/0.9)+(0.85*35*1000*x(2)*0.411*(x(7)-0.025))+(x(12)*((600083*(0.411*(x(7)-0.025)-(0.85*0.025))/(0.411*(x(7)-0.025)))-(849.77*35))))/(275*1000)) else x(11)-(0.0025*x(7)) end ];[%if ((0.196*((x(2)^3)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/(x(1)*(1-exp((-1.025*x(3))/x(1)))))<=(0.5*x(7)-0.025) x(12)-((6.95*(x(1)^2)*(1-exp((-1.025*x(3))/x(1)))*(0.5*x(7)-0.025-((0.196*((x(2)^3)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/(x(1)*(1-exp((-1.025*x(3))/x(1)))))))/(0.9*275*1000*(x(7)-0.05))) else if ((0.196*((x(2)^3)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/(x(1)*(1-exp((-1.025*x(3))/x(1)))))>(0.5*x(7)-0.025) x(12)-(((((6.95*(x(1)^2)*(1-exp((-1.025*x(3))/x(1)))*(0.5*x(7)-0.025-((0.196*((x(2)^3)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/(x(1)*(1-exp((-1.025*x(3))/x(1)))))))/0.9)-(0.85*35*1000*x(2)*0.411*(x(7)-0.025)*(x(7)-0.025-(0.5*0.411*(x(7)-0.025)))))/(((600083*(0.411*(x(7)-0.025)-(0.85*0.025))/(0.411*(x(7)-0.025)))-(849.77*35))*(x(7)-0.05)))) else x(12)-(0.0025*x(7)) end if ((0.00489*(((8.1*x(1)*(1-exp((-1.025*x(3))/x(1))))+(8.3*x(4)))*((0.577*((sin(x(5)))^2))+((cos(x(5)))^2))*((x(1)+x(7))^2)))/(1.275*x(2)*sin(x(5))*(((16.21*((x(1)*x(2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))+(8.3*x(4)))*((0.577*((sin(x(6)))^2))+((cos(x(6)))^2)))))<=(0.5*x(7)-0.025) x(13)-(((1.275*x(2)*sin(x(5))*(((16.21*((x(1)*x(2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))+(8.3*x(4)))*((0.577*((sin(x(6)))^2))+((cos(x(6)))^2))))*(.5*x(7)-0.025-(((0.00489*(((8.1*x(1)*(1-exp((-1.025*x(3))/x(1))))+(8.3*x(4)))*((0.577*((sin(x(5)))^2))+((cos(x(5)))^2)))*((x(1)+x(7))^2)))/(1.275*x(2)*sin(x(5))*(((16.21*((x(1)*x(2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))+(8.3*x(4)))*((0.577*((sin(x(6)))^2))+((cos(x(6)))^2)))))))/(0.9*275*(x(7)-0.05)*1000)) else if (((0.00489*(((8.1*x(1)*(1-exp((-1.025*x(3))/x(1))))+(8.3*x(4)))*((0.577*((sin(x(5)))^2))+((cos(x(5)))^2)))*((x(1)+x(7))^2)))/(1.275*x(2)*sin(x(5))*(((16.21*((x(1)*x(2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))+(8.3*x(4)))*((0.577*((sin(x(6)))^2))+((cos(x(6)))^2)))))>(0.5*x(7)-0.025)) x(13)-((((((1.275*x(2)*sin(x(5))*(((16.21*((x(1)*x(2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))+(8.3*x(4)))*((0.577*((sin(x(6)))^2))+((cos(x(6)))^2)))))*(.5*x(7)-0.025-((0.00489*(((8.1*x(1)*(1-exp((-1.025*x(3))/x(1))))+(8.3*x(4)))*((0.577*((sin(x(5)))^2))+((cos(x(5)))^2)))*((x(1)+x(7))^2))/(1.275*x(2)*sin(x(5))*(((16.21*((x(1)*x(2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))+(8.3*x(4)))*((0.577*((sin(x(6)))^2))+((cos(x(6)))^2)))))))/0.9)-(0.85*35*1000*x(2)*0.411*(x(7)-0.025)*(x(7)-0.025-(0.5*0.411*(x(7)-0.025)))))/(((600083*((0.411*(x(7)-0.025)-(0.85*0.025))/(0.411*(x(7)-0.025))))-(849.77*35))*(x(7)-0.05))) else x(13)-(0.0025*x(7)) end
tahseen90 abd
tahseen90 abd on 9 Jul 2015
ceq=if (((0.025*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))) <=(0.5*x(7)-0.025) x(9)-((13.91*((x(1)*(x(2)^2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))*(0.5*x(7)+((((0.025*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))))-0.025))/(0.9*1000*275*(x(7)-0.05))) else if (((0.025*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))) > (0.5*x(7)-0.025) x(9)-(((13.91*((x(1)*(x(2)^2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/0.9)+(0.85*35*1000*x(2)*0.411*(x(7)-0.025))+(x(10)*((600083*(0.411*(x(7)-0.025)-(0.85*0.025))/(0.411*(x(7)-0.025)))-(849.77*35)))) else x(9)-(0.0025*x(7)) end
if ((0.049*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))<=(0.5*x(7)-0.025) x(10)-((13.91*(((x(2)^2)*x(1))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))*(0.5*x(7)-0.025-((0.049*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))))/(0.9*275*1000*(x(7)-0.05))) else if ((0.049*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))>(0.5*x(7)-0.025) x(10)-(((13.91*(((x(2)^2)*x(1))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))*(0.5*x(7)-0.025-((0.049*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))))/0.9)-(0.85*35*1000*x(2)*0.411*(x(7)-0.025)*(x(7)-0.025-(0.5*0.411*(x(7)-0.025)))))/(((600083*(0.411*(x(7)-0.025)-(0.85*0.025))/(0.411*(x(7)-0.025)))-(849.77*35))*(x(7)-0.05))) else x(10)-(0.0025*x(7)) end if ((0.098*(((x(2))^3)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/(x(1)*(1-exp((-1.025*x(3))/x(1)))))<=(0.5*x(7)-0.025) x(11)-((6.95*(x(1)^2)*(1-exp((-1.025*x(3))/x(1)))*(0.5*x(7)-0.025+(0.098*(((x(2))^3)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/(x(1)*(1-exp((-1.025*x(3))/x(1))))))/(0.9*1000*275*(x(7)-0.05))) else if ((0.098*(((x(2))^3)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/(x(1)*(1-exp((-1.025*x(3))/x(1)))))>(0.5*x(7)-0.025) x(11)-((((6.95*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/0.9)+(0.85*35*1000*x(2)*0.411*(x(7)-0.025))+(x(12)*((600083*(0.411*(x(7)-0.025)-(0.85*0.025))/(0.411*(x(7)-0.025)))-(849.77*35))))/(275*1000)) else x(11)-(0.0025*x(7)) %end
if ((0.196*((x(2)^3)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/(x(1)*(1-exp((-1.025*x(3))/x(1)))))<=(0.5*x(7)-0.025) x(12)-((6.95*(x(1)^2)*(1-exp((-1.025*x(3))/x(1)))*(0.5*x(7)-0.025-((0.196*((x(2)^3)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/(x(1)*(1-exp((-1.025*x(3))/x(1)))))))/(0.9*275*1000*(x(7)-0.05))) else if ((0.196*((x(2)^3)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/(x(1)*(1-exp((-1.025*x(3))/x(1)))))>(0.5*x(7)-0.025) x(12)-(((((6.95*(x(1)^2)*(1-exp((-1.025*x(3))/x(1)))*(0.5*x(7)-0.025-((0.196*((x(2)^3)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/(x(1)*(1-exp((-1.025*x(3))/x(1)))))))/0.9)-(0.85*35*1000*x(2)*0.411*(x(7)-0.025)*(x(7)-0.025-(0.5*0.411*(x(7)-0.025)))))/(((600083*(0.411*(x(7)-0.025)-(0.85*0.025))/(0.411*(x(7)-0.025)))-(849.77*35))*(x(7)-0.05)))) else x(12)-(0.0025*x(7)) end
if ((0.00489*(((8.1*x(1)*(1-exp((-1.025*x(3))/x(1))))+(8.3*x(4)))*((0.577*((sin(x(5)))^2))+((cos(x(5)))^2))*((x(1)+x(7))^2)))/(1.275*x(2)*sin(x(5))*(((16.21*((x(1)*x(2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))+(8.3*x(4)))*((0.577*((sin(x(6)))^2))+((cos(x(6)))^2)))))<=(0.5*x(7)-0.025) x(13)-(((1.275*x(2)*sin(x(5))*(((16.21*((x(1)*x(2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))+(8.3*x(4)))*((0.577*((sin(x(6)))^2))+((cos(x(6)))^2))))*(.5*x(7)-0.025-(((0.00489*(((8.1*x(1)*(1-exp((-1.025*x(3))/x(1))))+(8.3*x(4)))*((0.577*((sin(x(5)))^2))+((cos(x(5)))^2)))*((x(1)+x(7))^2)))/(1.275*x(2)*sin(x(5))*(((16.21*((x(1)*x(2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))+(8.3*x(4)))*((0.577*((sin(x(6)))^2))+((cos(x(6)))^2)))))))/(0.9*275*(x(7)-0.05)*1000)) else if (((0.00489*(((8.1*x(1)*(1-exp((-1.025*x(3))/x(1))))+(8.3*x(4)))*((0.577*((sin(x(5)))^2))+((cos(x(5)))^2)))*((x(1)+x(7))^2)))/(1.275*x(2)*sin(x(5))*(((16.21*((x(1)*x(2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))+(8.3*x(4)))*((0.577*((sin(x(6)))^2))+((cos(x(6)))^2)))))>(0.5*x(7)-0.025)) x(13)-((((((1.275*x(2)*sin(x(5))*(((16.21*((x(1)*x(2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))+(8.3*x(4)))*((0.577*((sin(x(6)))^2))+((cos(x(6)))^2)))))*(.5*x(7)-0.025-((0.00489*(((8.1*x(1)*(1-exp((-1.025*x(3))/x(1))))+(8.3*x(4)))*((0.577*((sin(x(5)))^2))+((cos(x(5)))^2)))*((x(1)+x(7))^2))/(1.275*x(2)*sin(x(5))*(((16.21*((x(1)*x(2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))+(8.3*x(4)))*((0.577*((sin(x(6)))^2))+((cos(x(6)))^2)))))))/0.9)-(0.85*35*1000*x(2)*0.411*(x(7)-0.025)*(x(7)-0.025-(0.5*0.411*(x(7)-0.025)))))/(((600083*((0.411*(x(7)-0.025)-(0.85*0.025))/(0.411*(x(7)-0.025))))-(849.77*35))*(x(7)-0.05))) else x(13)-(0.0025*x(7)) end

Sign in to comment.

More Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 8 Jul 2015
Edited: Azzi Abdelmalek on 8 Jul 2015
Remove ceq= from your If expression
a=(((0.025*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))))
if a<=(0.5*x(7)-0.025)
x(9)=((13.91*((x(1)*(x(2)^2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))*(0.5*x(7)+((((0.025*(x(1)^2)*(1-exp((-1.025*x(3))/x(1))))/(((x(2)^2)/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2))))))))-0.025))/(0.9*1000*275*(x(7)-0.05)));
else if a > (0.5*x(7)-0.025)
x(9)=(((13.91*((x(1)*(x(2)^2))/(x(1)+x(2)))*(1-exp((-0.513*x(3)*(x(1)+x(2)))/(x(1)*x(2)))))/0.9)+(0.85*35*1000*x(2)*0.411*(x(7)-0.025))+(x(10)*((600083*(0.411*(x(7)-0.025)-(0.85*0.025))/(0.411*(x(7)-0.025)))-(849.77*35))));
else
x(9)=(0.0025*x(7));
end

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!