Thanks Mark,
Based on your comment, I updated Ji= Ji + alpha*eye(N,N);
And only when alpha >= 1, the error disappears. Even for alpha= 1e-1 it remains. I think I’d re-write the problem somehow. In any case, I think it’s important to find another way to tunning how CVX considers a matrix to be undefined.
Thanks in any case,