フィルターのクリア

How to maximize this function: x1^2+x2^2+...+xn^2 ?

3 ビュー (過去 30 日間)
Alex
Alex 2012 年 7 月 2 日
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

回答 (2 件)

Sean de Wolski
Sean de Wolski 2012 年 7 月 2 日
fmincon
  1 件のコメント
Teja Muppirala
Teja Muppirala 2012 年 7 月 3 日
Or how about QUADPROG?
H = identity matrix
f = zero vector
A,b = your linear constraints

サインインしてコメントする。


Richard Brown
Richard Brown 2012 年 7 月 3 日
編集済み: Richard Brown 2012 年 7 月 3 日
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 件のコメント
Richard Brown
Richard Brown 2012 年 7 月 3 日
just reread your question - if your constraints are inequalities, quadprog is the way to go

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeQuadratic Programming and Cone Programming についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by