How can i minimize a function provided that another function is greater than 0?
Show older comments
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)
Accepted Answer
More Answers (0)
Categories
Find more on Mathematics and Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!