I am solving one optimization using fmincon. Objectives function is a variable of x1,x2,x3.
B= 0; c =[ 0 0.1736 0.0693; 0 0 0.1736]
c =
0 0.1736 0.0693
0 0 0.1736
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
Lam = sym('Lam', [1, n]);
Pt = sym('P_opt', [1, n]);
Per = sym('Per', [1, n]);
term_sum = term_sum + ((1 - sqrt(1 - Th(j))) * c(j, i))^2;
z(i) = Z * (1 - sqrt(term_sum));
Lam(i) = (x(i) * R) / z(i);
Th(i) = (0.000086 * B - 0.0026) * Lam(i)^3 + (-0.0018 * B + 0.0481) * Lam(i)^2 + (0.008 * B - 0.165) * Lam(i) + (-0.0116 * B + 0.3);
Per(i) = 0.22 * (116 / (Lam(i) + 0.08 * B) - 4.06 / (B^3 + 1) - 0.4 * B - 5) * exp(-12.5 / (Lam(i) + 0.08 * B) + 0.4375 / (B^3 + 1));
Pt(i) = 0.5 * rho * A * Per(i) * z(i)^3;
objective = -sum(Pt)
objective =
Obj = matlabFunction(objective, 'Vars', {x});
lb = 0.1687 * z(i)
Unrecognized function or variable 'v'.
options = optimoptions('fmincon', 'Display', 'iter', 'Algorithm', 'interior-point');
[x_opt, fval_opt] = fmincon(Obj, x0, [], [], Aeq, beq, lb, ub, [], options);
In my optimization lower bound of the optimization is a function of optimaztion variables. How can I solve it? fmincon can be able to do it or another optimization tools can be chosen?