Why do I get error if I try to minimize a function of the form x’Ay where A is data matrix and x and y are some variable that I want to minimize. The actual code has many other function in minimization and many constraints. I ma just giving the function where I get complain. The complain is:

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 );

Any suggestion would be appreciated.