the second picture is in constrain,but if I go on with this,it turns

and q2 is a polynomial into a monomiial, but it will not succeed if there are zeros in a.

unluckily,same value in a are zero, how to detele them.or how to solve the problem of some value is zero in sita_d

CVX does not allow use of CVX variables or expressions as indices. if `a`

is a CVX expression, it can’t be used as you have attempted.

It appears you want the product of the non-zero elements of `a`

. I think that would be non-convex, in which case you would need to introduce binary variables MIDCP) and use Big M if else logic to handle that. I think that would require establishing a threshold for the smallest magnitude number which is considered to be zero. You can look at https://or.stackexchange.com/search?q=logic+constraints to help you figure out how to do that, or post there for assistance in the modelling (make it an inquiry not tied to CVX).