cvx_begin
variable X(4);
loss =1./(( pi*X.*X))
minimize(loss))
cvx_end
cvx_begin
variable X(4);
loss =1./(( pi*X.*X))
minimize(loss))
cvx_end
Your expression does not evaluate to a scalar. But that could easily be fixed.
More seriously 1/(x'*x)
is neither convex nor concave when length(x) >= 2. For instance, the Hessian of 1/(x(1)^2+x(2)^2)
has one negative and one positive eigenvalue at x(1)=x(2)=1
.
Any convexification of this would be a completely different model, which is not the purview of forum readers to formulate.
Note 1/x^2
is convex for scalar x
, in which case pow_p(x,-2)
can be used.