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:

clear;

close all;

clc;

P=diag([0.8969 0.9451 0.9258 0.9591 0.8553 0.9974 0.8669 0.9567 0.9044 1.0000]);

n=10;

N=sqrt(10);

cvx_begin

variable x(n)

maximize ( quad_form(x,P) )

norm(x,2)<=N; %#ok

cvx_end

Thanks