Minimize a function with 2 variables and 2 inequality constraints.

5 Ansichten (letzte 30 Tage)
Hello community,
i have a function with 2 variables to minimize.
f(x,y)= 0.5*(a*x+b*y)+0.5*((x+y)-P)) ^2
0.2 <=x<= 0.6
0<=y<= 0.2
i have to find the values of x, and y
thank you for helping me.

Akzeptierte Antwort

Stephan
Stephan am 26 Nov. 2020
Bearbeitet: Stephan am 26 Nov. 2020
fmincon appears to be the right choice for this. Note that you in fact have 4 constraints. You find examples how to write the code for this under the provided link.

Weitere Antworten (0)

Kategorien

Mehr zu Nonlinear Optimization finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by