About the cvx_status

Hi all ! Now i meet some problems.

Sometimes the result variable of cvx has a solution, but the cvx_status displays “failed”. When I changed the size of input data , the result of variable is “NAN”, and the status displays “infeasible”. Is this normal? How can I ensure that it has a solution?

And I need the result of cvx variable. So can i use the result of cvx variable, even though the cvx_state is not successful?

If cbx_status is failed and the CVX variables have numerical values rather than nan, I would not trust the results. If you have an example of cvx_status failed but numerical results for CVX variables, please post all the details, with a reproducible example if possible.

If the result is infeasible, then I believe the CVX variables will be nan.

You got the link https://yalmip.github.io/debugginginfeasible in another thread, which can help you diagnose infeasibility. So try following that advice (except for section 1, which does not apply to CVX).


Thanks a lot. I need to learn more at this link. I have attached the figure, as shown. The cvx variable is solvable at this time. But when I change a specific value, cvx shows feasible, the result is nan.

Sorry. There was an error in the last sentence. Change to:
‘But when I change a specific value, cvx shows infeasible, the result is nan.’