The original optimization problem is:

```
max trace(AX)/(trace(BX)+c)
s.t. diag(X)<=Y
and rank(X)=1,X>=0
```

where X=ww’, w is a (10,1) complex vector, A,B are (10,10) matrix, c is a real scalar, Y is a real vector. Obviously, X is a symmetric semidefinite matrix.

In order to solve the problem in CVX, I use a semidefinite relaxation, and solve an equivalent problem:

```
max t
s.t. trace(X(A-tB))>=ct
and diag(X)<=Y
and X>=0
```

the code is here:

```
cvx_begin quiet
variable X(10,10);
X == semidefinite(10);
variable t;
maximize(t);
Z = trace(X*(A-t*B))-c*t;
subject to
Z >= 0;
diag(X) <= Y;
cvx_end
```

However, there’s always an error:

??? Error using ==> cvx.mtimes at 127

Disciplined convex programming error:

Invalid quadratic form: must be a scalar.

I’ve tried many other ways to modify the code. They didn’t work, though. I don’t know why. And please give me some suggestions to solve the problem. Thanks!