P=10;
T=3;
cvx_begin
variable w(T,1)
variable x
expression med
med=square_abs(norm(w)-x);
minimize( med +norm(w) )
subject to
norm(w)<=x;
x^2<=P;
cvx_end
Due to some reasons, I have to introduce another variable x in problem, and I want the squre form of the error, i.e. (norm(w)-x)^2 But the problem is that I have tried all the function the cvx user’s guide suggested, like square_abs, square_pos, square,pow_p, pow_pos,pow_abs. And I always get the same reply ‘illegal operation’. Does that mean this problem can’t be solved if I want to keep the squrare form?