I want to ask a question. In my opinion, the first term of Min function is a convex function and the second term is a linear function. Why can’t CVX be used to solve it directly?

codes

Nt=4;

N=4;

h=(randn(1,Nt)+1i*randn(1,Nt))/sqrt(2);
g=(randn(N,1)+1i*randn(N,1))/sqrt(2);

SNR_rd=(sum(abs(g)))^2;

cvx_begin

variables P1 P2 w(Nt,1);

maximize min((norm(h

*w))^2,P2*SNR_rd)

subject to

power(norm(w),2)<=P1;

P1+P2==1;

P1>eps;

P2>eps;

cvx_end

Disciplined convex programming error:

Invalid operation: min( {positive convex}, {real affine} )