MATLAB Answers

0

Equality constraint in quadratic programming

Asked by Muhammad Kundi on 9 Oct 2019
Latest activity Commented on by Muhammad Kundi on 10 Oct 2019
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 Comments

Sign in to comment.

1 Answer

Answer by Bruno Luong
on 9 Oct 2019
Edited by Bruno Luong
on 9 Oct 2019
 Accepted Answer

Yes, il looks right to me.
EDIT:
No Q(3,1) must be 0
Q=[2 1 0;
1 4 0 ;
0 0 6]

  1 Comment

Sign in to comment.