# An error :Invalid quadratic form(s): not a square

When I reproduce this paper, I encounter a problem . The optimization problem is as follows

they said that this is convex. when I write constraint (25a) and (25b), there is an error.
Disciplined convex programming error:
Invalid quadratic form(s): not a square.
my code is
log(r1(k))+log(t1(k))-t1(k)(r2(k))+1-l(k)>=R_thlog(2);
where r1(k) and r2(k) is the term containTrace

How to realize this constraint use CVX?

The first thing you need to do is to understand what the mathematical statement of the problem is. I don’t.

For instance, what is the right-hand side of the first line of (27), and how does that evaluate to a scalar? is there a misplaced parenthesis and `W` is supposed to be inside trace?

The right-hand side of the first line of (26) looks like the `log of 1 plus scalar*matrix)`. What is that? It can’t be a matrix log, because it needs to evaluate to a scalar. Or is there a misplaced parenthesis and `W` is supposed to be inside trace? Is this really `log_det`? But what to make of `1`?

I suggest you simplify to the simplest case, get rid of the confusing subscripts, and write out explicitly what the problem is. You can’t even help yourself until you do that.

Even if this is a convex problem, that doesn’t mean it can be formulated for entry in CVX.

If by chance there is some kind of matrix log, perhaps CVXQUAD can help https://github.com/hfawzi/cvxquad