Equality constraint in quadratic programming

2 ビュー (過去 30 日間)
Muhammad Kundi
Muhammad Kundi 2019 年 10 月 9 日
コメント済み: Muhammad Kundi 2019 年 10 月 10 日
hi,
I have written the following code:
Q=[2 1 0;1 4 0 ; 1 0 6];
c=[1;-2 ;4];
A=[3 4 -2; 3 -2 -1];
b =[10; -2];
Aeq = [2 3 4];
beq=[5]
LB=[0;0;0];
UB=[5;5;5];
[x, fval, exitflag, output, lambda]=quadprog(Q,c,A,b,Aeq,beq,LB,UB);
Am I doing the right procedure?
I am getting value of x1=0.0000 ...Is it ok

採用された回答

Bruno Luong
Bruno Luong 2019 年 10 月 9 日
編集済み: Bruno Luong 2019 年 10 月 9 日
Yes, il looks right to me.
EDIT:
No Q(3,1) must be 0
Q=[2 1 0;
1 4 0 ;
0 0 6]

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Optimization Toolbox についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by