Help! The result is so strange

I use CVX in a script to solve two different problems, P1 and P2. P1 is solved, while P2 is unbounded. But if I save the result of P1, then clear all, and solve P2, the result of P2 is solved.

I don’t have any idea what you did. Nor, I suspect, does anyone else reading your post.

What is the putput of
cvx_version
?

Please copy and paste, using Prefromattedc text icon, an entire MATLAB session, with all output, which illustrates what you are observing.

I think solving P2 resolves the issue of it being unbounded. This could be due to environmental variables or the script’s initial conditions affecting the solver’s behavior. It’s great to hear that P2 is now successfully solved after these adjustments!