# How to interpret "Status: Solved; Optimal value (cvx_optval): NaN"?

I have convex problem and I solve it by CVX.
The outcome is
Status: Solved
Optimal value (cvx_optval): NaN
It’s quite weird to me: since the CVX successfully solved our problem, how come I get a NaN in the end?
Any interpretation what’s wrong with my problem here?
Thanks so much!
Full output attached:

## Calling SDPT3 4.0: 2402 variables, 601 equality constraints For improved efficiency, SDPT3 is solving the dual problem.

num. of constraints = 601
dim. of socp var = 1202, num. of socp blk = 1
dim. of linear var = 1200

SDPT3: Infeasible path-following algorithms

## number of iterations = 22 primal objective value = NaN dual objective value = -5.57119121e+05 gap := trace(XZ) = NaN relative gap = NaN actual relative gap = NaN rel. primal infeas (scaled problem) = NaN rel. dual " " " = 2.69e-11 rel. primal infeas (unscaled problem) = 0.00e+00 rel. dual " " " = 0.00e+00 norm(X), norm(y), norm(Z) = NaN, 4.4e+04, 6.3e+04 norm(A), norm(b), norm© = 5.0e+01, 8.4e+04, 4.0e+02 Total CPU time (secs) = 7.89 CPU time per iteration = 0.36 termination code = 0 DIMACS: NaN 0.0e+00 1.2e-10 0.0e+00 NaN NaN

Status: Solved
Optimal value (cvx_optval): NaN

looks like a solver issue, since SDPT3 itself is seeing nan values. Try SeDuMi.

Seems like SeDuMi works better, thanks so much!

By the way, a little description about my optimization problem:
all the constraints are linear equality and inequality constraints,
the objective is quadratic function in the form of x’Qx+c’x. Here Q is a positive semi-definite matrix, and in most cases Q is singular.
From the CVX guidance, to fulfill the performance, I’d better write the object in terms of norms rather than the quadratic form directly. Is that correct?
What is the best formation you recommend, to get the best efficiency? Maybe to write my problem in the form of SOCP or more general DCP?

Thanks so much, Micheal!