How to solve it about CVX' function?

variable Q(4, 4) hermitian semidefinite
minimize log_det(eye(4, 4) + eye(4, 4) * inv(eye(4, 4)+H * Q * H’))
trace(Q) <= P

Error using evalin
Undefined function ‘inv’ for input arguments of type ‘cvx’.

How to solve the ‘inv’ problem? Can someone help?

Thank you very much for your reply. But i saw that someone discussed that it (log_det(I+A^(-1))) is convex in the following link. Help with log det expression
let’s not discuss the concavity and convexity of the original problem for now, and first solve how A^(-1) is expressed in CVX.

@Milad_A I don’t believe your reformulation is correct, as can be seen with a numerical example.

And perhaps someone can check the correctness of the convexity “proof” made in the link posted by @1979603738

thanks very much for your reply. sorry, to be honest, i can’t prove its (log_det(I+A^(-1))) convexity by strict proof. There is no strict proof in the link, only that it has been proved to be convex.

I also saw that you proposed to use Shure complement to solve the expression problem of inv, but it was not resolved at that time. i don’t know if you have any ideas now.

In addition, i also have a question about symbolic variables. An expression containing symbolic variables appears in the problem of convex optimization. Can such a problem be realized in matlab? If it can, how should it be realized?


Awesome! thank you so much! i’m going to implement it now.

In addition, log_det(I+B*A^(-1)), B is certain positive semidefinite Hermitian, this formulation should is not convex. this right?
i see, it is not convex.

i still have no idea about its convexity, but we don’t use log_det to compute it.

Hello, I found a question about log_det,we know that ‘‘log_det constrains the matrix to be symmetric (if real) or Hermitian (if complex) and positive semidefinite.’’
But I find log_det(A), (A is an expression about the Hermitian matrix X, like A = I + HQH’/(I+X), Q is diagonal, Then I use the Shure complement method above by analogy,get A = inv(I -HQH’U) , U >= inv(I+HQ*H’+X)), when A does not meet the above requirements, CVX can still solve maximum of log_det(A), unlike the return - Inf stated in the regulations.
However, what is interesting is the so-called maximum value of this solution. I found that it is not the maximum value. I can find a larger one.
Thus, I’m a little confused. Can you help me analyze it? Thank you !

Please show a compete reproducible example, and the output which supports your claims.

“With numerical argument, log_det returns -Inf if these constraints are not met.” applies only to numerical arguments, not CVX variables or expressions. I.e, this applies if you use it on a MATLAB double precision variable outside CVX.

N_R = 4;
H_SE = randn(N_R, N_R) +1irandn(N_R,N_R);
H_SD = randn(N_R, N_R) +1i
[U D V] = svd(H_SD);
Q_u = diag([1,2,3,4]);

    variable X(N_R, N_R) diagonal
    variable U(N_R, N_R) hermitian semidefinite

    maximize det_rootn(eye(N_R) - H_SE'*V*Q_u*V'*H_SE*U);

    [U, eye(N_R);eye(N_R), H_SE'*V*X*V'*H_SE + eye(N_R) + H_SE'*V*Q_u*V'*H_SE] == hermitian_semidefinite(2*N_R);
    trace(X) <= 4;
    X >= 0;


The specific code is as above, I hope you can find the problem about it.

Where is the output which supports your claims? Show us the solver and CVX output. Then show is the better solution, and that it is feasible.

Have you by any chance used a different set of random numbers, i.e., different problem instance, when claiming to have found a better solution than CVX?

You haven’t shown us the solver and CVX output. You are leaving too much to the imagination. And show us the entire sequence and output of all MATLAB commands producing the results you claim. I don’t find you post to be a pargon of clarity.

Sorry for my poor understanding of English.

Now show us your MATLAB commands and output which show that you have a better solution.

In any event, you would benefit from following the advice in CVXQUAD: How to use CVXQUAD's Pade Approximant instead of CVX's unreliable Successive Approximation for GP mode, log, exp, entr, rel_entr, kl_div, log_det, det_rootn, exponential cone. CVXQUAD's Quantum (Matrix) Entropy & Matrix Log related functions .

Ok, thank you, I will study the advice.

Please show a complete consistent set of all MATLAB commands and all solver, CVX, and MATLAB output, so we know what problem we are solving. The objective value you show with X is very different than the -8.72022 cvx_optval value you showed previously.(maybe a different problem instance)?

I think that the optimal object of cvx ( log_det(I - H_SD’ * V_SD * Q_u * V_SD’ * H_SD * U)) that I transformed through Shure complement method is equivalent to - log_det(I+H_SE’ * V_SD * Q_u * V_SD’ * H_SE * inv(H_SE’ * V_SD * X2 * V_SD’ * H_SE+I)).
Maybe this equivalence is wrong,let me think again.

The only fair comparison for CVX is to compare the value of the objective function as provided in the CVX program, but using a supposed better feasible solution, to the solution returned by CVX.