How can i minimize a function provided that another function is greater than 0?
显示 更早的评论
I have a function (WT) and my code created by fmincon minimizes WT with using inequlaties and lower bounds. WT is sum of another functions (R+L+B+S) and when fmincon is running, B function must be greater than zero. I don't know how i can achieve this problem.
Is there a way a pratical approach for this?
Thanks a lot.
.
.
.
first=@(A) 15+7*A
B=@(D,A) sum(2000*(1/(2*5))*((first(A)-D*[2:7]).^2-(first(A)-D*[1:7-1]).^2));
W_Y(D,A)=R(D,A)+B(D,A)+S+R(D,A)
WT=@(YH) W_H(YH(2))+W_Y(YH(1),YH(2));
x0=[0,0];
A=[1 ,-1.066441];
b= 0.058766;
Aeq=[];
beq=[];
lb=[0,0];
ub=[];
YH=fmincon(W_T,x0,A,b,Aeq,beq,lb,ub)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Mathematics and Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!