You are on page 1of 1

1

2
3
4
5
6
7
8
9
10
11

#Problem 1: Using qp command

p= [2 1; 1 2];
q=[-1; -2];
a= [1 -2; -2 1];
b= [-4; 1];
x0=[0; 0];
[x,opt,status,lambda]= qp(x0,p,q,[],[],[],[],[],a,b);
opt_cost= opt+3
disp(x);

You might also like