fmincon and constrains
Ältere Kommentare anzeigen
Hello, I have a funktion f(x)
f and x are vector which I want to minimize with fmincon()
How can I implement follwing constrain:
x~=y this means the solution x is unequal to a vector y that I know
Akzeptierte Antwort
Weitere Antworten (2)
John Miller
am 16 Jun. 2012
0 Stimmen
Sargondjani
am 17 Jun. 2012
0 Stimmen
if you want to minimize all the values in the vector, you can sum them and use that as your objective....
about the not equal thing: i think it will make your problem non-differentiable, so you can not use fmincon in this way...
you would have to do it some other way: solve fmincon for all discrete cases or use genetic algorithm
2 Kommentare
John Miller
am 17 Jun. 2012
Sargondjani
am 17 Jun. 2012
why not?? im mean, if you minimize 10 values that is the same as taking the minimum of the sum of those values... although you have to be carefull with scaling (the change in the objective of each fi)
Kategorien
Mehr zu Choose a Solver finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!