Hi, I’m new with cvx. I want to solve the optimization problem maximize( quad_form(x,P)) ) subject to norm(x,2)<=N. But There is something wrong and I have no idea to solve it.
I wrote this code:

Error in maximize (line 21)
newobj( prob, ‘maximize’, x );

That tells you exactly what CVX objects to. If you minimize instead of maximize, CVX will accept the problem, and the solver it calls will solve it. If you really wish to maximize a convex quadratic objective function, that is a non-convex problem which CVX will not accept, and you will need to use some other tool to solve it.