You have several syntax errors as well as optimization formulation problems.
log_det (you can divide by
log(2) if you want, but I won't bother). Don't use
The argument of
diag((v)) * H * H' is not symmetric, so I think. is not a convex optimization problem. I will now guess that you intended
H*diag(v)*H' to be that argument. Making all these changes, a problem which can be accepted by CVX can be entered (I also changed
< 3 to
<= 3, which is how it will be interpreted by CVX).
H = [1 2 3; 4 5 6; 7 8 9];
maximize (log_det (H*diag((v))* H'))
1 <= trace(diag(v)) <= 3;
However, this problem is unbounded, as can be seen by making v(1) large and v(2) = -v(1), which will still meet the constraint
1 <= trace(diag(v)) <= 3.
If you add a constraint such as
v >= 0, the problem will be bounded and have a finite solution. However, with sedumi, sdpt3, and scs, in CVX3.0beta build 1177, this problem incorrectly is reported as being unbounded (i.e., with constraint
v >= 0 added) which appears to be a bug in CVX 3.0 beta build 1177, because CVX 's successive approximation method is not being used when scs is used.