Optimization nonlinear function with several variable
12 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Asshaa
il 14 Mar 2022
Commentato: Walter Roberson
il 16 Mar 2022
i have nonlinear function
and the constraint
have lower and upper boundary.
f(x,y,z)
0<=x<=2 , 0<=y<=1, -1<=z<=1
i want to optimize this function to find the max value. define g(x,y,z)=-f(x,y,z) since we want to find the max. How to use the fminsearch/fmincon on this fucntion in MATLAB?
0 Commenti
Risposta accettata
Walter Roberson
il 14 Mar 2022
A = []; b = [];
Aeq = []; beq = [];
lb = [0 0 -1];
ub = [2 1 1];
nonlcon = [];
g = @(xyz) -f(xyz(1), xyz(2), xyz(3));
[bestxyz, fval] = fmincon(g, A, b, Aeq, beq, lb, ub, nonlcon);
3 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Nonlinear Optimization in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!