Please read the answer, shoiwn below, by CVX developer mcg in this post Matlab parallel toolbox from 6 1/2 years ago. I don’t know whether anything has changed since then. If you get a result, I am not in a position to guarantee its correctness, but I am not aware of any reports in which an answer (other than NaN) has been obtained which was incorrect when using parfor,
CVX simply cannot be used with
parfor. If it works sometimes, that’s an interesting artifact, but it should not be relied upon.