logdet is used to define objective functions in determinant maximization problems.
p = logdet(x)
This command is for specifying an objective function in combination with primarily sdpt3 which supports logdet terms natively.
If you use the exponential cone capable solver mosek, you can use log(geomean(x)) as an equivalent expression.
If you use any other SDP solver, use the geomean operator instead to work with the product of the eigenvalues (and thus the determinant). Note that the operator is concave and thus only can be maximized (or minimized if negated).
YALMIP will automatically replace the logdet term in an objective with a geomean when you use an SDP solver other than sdpt3, and the objective only contains the negated logdet term. This is valid since the two functions are monotonically related.
If you have a logdet operator on a variable \(X\), the constraint \(X \succeq 0\) should not be added to the model. It is automatically assumed by the solver.
If you want to work with determinants in a less structured fashion without a logdet capable solver, make sure to read the documentation on the det command.