Illegal addition encountered (e.g., {convex} + {concave})

up_r(k(i))=-F(k(i),:)*A_matrix(:,:,k(i))F(k(i),:)'+2real(F(k(i),:)*real_part(:,k(i)));
It’s my objective function which I’ve commented before. I think you don’t really understand what I’m asking literally.

You can see the typical QCQP form I coded before. In the middle, A_matrix is a symmetric matrix and it’s multiple by the up_USER_ch(:,k(i))*up_USER_ch(:,k(i))’.
And A_matrix= up_USER_ch(:,k(i))*up_USER_ch(:,k(i))’. They’re the same thing. But the former cannot run, while the latter can. How absurd.

Yes, i don’t understand what you are saying, and still don’t.

Please show a complete minimal reproducible example which does not run (and show us the CVX and solver output), and the example which does run.