How to solve ''Unable to perform assignment because value of type 'cvx' is not convertible to 'double'

You are violating CVX’s rules. Your first task is to prove that your optimization problem is a convex optimization problem. if it is, a reformulation to satisfy CVX’s DCP rules might be possible. If it is not a convex optimization problem, such a reformulation is not possible.