How to compute inverse of matrix

I have to minimize Trace(C*inv(phi)) with respect to phi. C is a constant matrix. Here phi is positive semidefinite. When I tried this in CVX, it says “Undefined function ‘inv’ for input arguments of type ‘cvx’”. Can we write the objective function in SDP form ?

If C is symmetric positive semidefinite (psd), let R = chol(C). Then trace(C*inv(phi) = trace(R'*R*inv(phi)) = trace(R*inv(phi)*R') . Then use the solution in Generalizing “trace_inv” for matrix quadratic forms

If C is not psd, then trace(C*inv(phi)) is not necessarily convex. For example, in one dimension, let C = -1, then trace(C*inv(phi)) = -1/phi, which is not convex.

If C is invertible and you are willing for phi*inv(C) to be implicitly constrained to be psd, you can simply use minimize(trace_inv(phi*inv(C)))