However, in the latter link you will see matrix_frac .
matrix_frac Matrix fractional function.
matrix_frac(x,Y), where Y is a square matrix and x is a vector of the
same size, computes x’*(inv(Y)*x) if Y is Hermitian positive definite, and
An error results if Y is not a square matrix, or the size of
the vector x does not match the size of matrix Y.
Disciplined convex programming information:
matrix_frac is convex and nonmonotonic (at least with respect to
elementwise comparison), so its argument must be affine.
Also, norm(p0,1)=norm(X,2)^2/10,p0 >=0 doesn’t make any sense. I can;t tell you how to fix it because I don’t know what you’re trying to do.
inv is a “problem” if applied to a CVX variable or expression; it will produce an error message. inv can be applied to input data (i.e., constant from CVX’s perspective), as used in the code shown here.
I now see that you are trying to include two constraints on one line, separated by a comma.
Your first attempt, norm(p0,1)=norm(X,2)^2/10, is an illegal expression assignment.attempt.
Your second attempt, norm(p0,1) == norm(X,2)^2/10 is a nonlinear equality constraint, which is non-convex and violates CVX;s DCP rules, hence the error message you received.
The last version you show, norm(p,1) <= norm(X,2)^2/10 is convex and acceptable to CVX. it is different than the non-convex equality constraint.
The sum of p can be constrained to be a constant with the constraint sum(p) == your_constant. DO you also want a constraint on the *one) norm of p? If so norm(p,1) <= some_constant is convex and allowed; while norm(p,1) == some_constant is non-convex and is not allowed in CVX.