If we have non-linear constraint can we use "quadprog"
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
RAHUL KUMAR
am 19 Sep. 2019
Kommentiert: Matt J
am 19 Sep. 2019
I have non-linear function and linear constraint so we can use "quadprog" algorithm.so my question is if i have non-linear objective function and no-linear constraint function ,can we use "quadprog" algorithm if not then which algorithm use
0 Kommentare
Akzeptierte Antwort
John D'Errico
am 19 Sep. 2019
Bearbeitet: John D'Errico
am 19 Sep. 2019
No. Quadprog is only able to accept LINEAR constraints. (equality, inequality, as well as bound constraints on the parameters. But they are all linear.)
Anyway, if your function is itself generally nonlinear, as opposed to a quadratic form, then you still cannot use quadprog.
You can use fmincon though, as it does accept nonlinear constrints.
2 Kommentare
Matt J
am 19 Sep. 2019
Bearbeitet: Matt J
am 19 Sep. 2019
(x-2)^2+(y-3)^2+6=0 and x^2+6=0
Thes constraints are infeasible. They have no real-valued solutions. Did you mean perhaps,
(x-2)^2+(y-3)^2 - 6 = 0 and
x^2 - 6 = 0
If you don't want to use fmincon, it would be best for you to tell us why and in what way the alternative needs to be better.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Quadratic Programming and Cone Programming 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!