Dynamic construction of constraint function in MATLAB optimization
显示 更早的评论
Based on matlab help for defining the constraints in an optimization problem, it should be a function of X only.
forexample:
function f = objconstr(x)
f.Fval = 100*(x(2) - x(1)^2)^2 + (1 - x(1))^2;
f.Ineq = (x(1)-1/3)^2 + (x(2)-1/3)^2 - (1/3)^2;
Now, Assume that my FVAL , and INEQ equations are keep changes dynamicly due to the diffrent states.
forexample my constrain is equal to = F1(F2(F3(x))), which for instance, F3(x)= A.*(X).^(B)+(C) (calucated from a curvefitting function).
My question is that how can I define A, B, and C in my code, so I dont need to write the numbers (coeficients) and instead it read it from my workspace.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Robust Control Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!