How do I put a constraint or an assignment on Y=y*y’

You can’t put a constraint or assignment on `y*y'`

in CVX, because `y*y'`

is non-convex. (8b) is a semidefinite relaxation of `Y = y*y'`

, and the constraint capturing that relaxation is in your code.

thanks, it will warning This linear matrix inequality appears to be unsymmetric. This is

very likely an error that will produce unexpected results. Please check

and the result of y(5:8) are not what i expected . maybe is F’s problem?

You need to declare `Y`

to be symmetric, because by default, it is full.

`variable Y(8.8) symmetric`

Also, i recommend you not use `quiet`

until you are sure everything is working correctly. By not using `quiet`

, you will see all the solver and CVX output.

the warning is disappeared,but the outout become

Status: Failed

Optimal value (cvx_optval): NaN

Perhaps you can show us all the solver and CvX output.

(upload://txvcx0aWJGIUjzKMrr3X419CpQI.png)

sometimes it can get a result ,but sometimes, the outcome become NaN

sometimes it can get a result ,but sometimes, the outcome become NaN

Perhaps the input data scaling is bad, such as having some very large numbers. Try to re-scale (change units of variables) so that non-zero input data is within a small number of orders of magnitude of one.

You can also try using Mosek if you have access to it.

I recommend not using CVX_precision best no matter what solver you use.

real thanks for you help i have solved this problem. now i want to set a range for the value of my variable y, how should i do. It seems wrong to put it directly in the constraint

If

`lower_bound <= y <= upper_bound`

is what you want, then use it.