For example, I declare a vector variable x = cvxpy.Variable(5). I want to enforce a constraint on such symmetric matrix,
[
[x[0], 0, 0, x[1]],
[0 , x[2], 0, 0],
[0 , 0, x[3], 0],
[ x[1], 0, 0, x[4] ]
]
to be semi-positive definite.
I know that in MatLAB, I can declare an expression holder, like "expression A(5,5)", then assign each element in A, then use "A==semidefinite(5)" when declaring the constraint. How should I do it in python with cvxpy?