Equality constraint in quadratic programming
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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 Exchange 中查找有关 Quadratic Programming and Cone Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!