Given two vectors **v1, v2** of size **n=20**, I am trying to solve the following

```
cvx_begin
variable x(n);
variable a1;
variable a2;
w_comb = a1 * v1 + a2 * v2;
maximize( w_comb'*x );
subject to
-x_r <= x <= x_r;
a1 + a2 == 1;
a1 >= 0; a2 >= 0;
cvx_end
```

but, I get the following error (Mosek proceeds to solve this as a conic):

Error using cvx/quad_form (line 230)

The second argument must be positive or negative semidefinite.Error in * (line 261)

[ z2, success ] = quad_form( xx, P, Q, R );

Do I need additional constraints on `a1, a2`

?