How to maximize this function: x1^2+x2^2+...+xn^2 ?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello
How can I maximize the function x1^2+x2^2+...+xn^2
under some constraints which are LINEAR?
Thank you very much in advance!
Alex
0 Kommentare
Antworten (2)
Sean de Wolski
am 2 Jul. 2012
fmincon
1 Kommentar
Teja Muppirala
am 3 Jul. 2012
Or how about QUADPROG?
H = identity matrix
f = zero vector
A,b = your linear constraints
Richard Brown
am 3 Jul. 2012
Bearbeitet: Richard Brown
am 3 Jul. 2012
I assume you mean minimise rather than maximise, because unless you have n independent constraints, your problem is unbounded.
In this case, assuming your constraints are Ax = b, just use the QR factorisation
[Q, R] = qr(A', 0);
x = Q * (R' \ b);
1 Kommentar
Richard Brown
am 3 Jul. 2012
just reread your question - if your constraints are inequalities, quadprog is the way to go
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!