Pow_p( {convex}, {-1} )

Here is one part of my codes.

 variable q(N,2,J) ;
...
  minimize(P);
   subject to
 for n=1:N
   for k=1:K
       for j=1:J
   RR51(k,j,n)=B(k,j,n)*log2(1+EgG2A*a0*P*inv_pos(pow_pos(norm(q(n,:,j)-qM(k,:)),2)+H^2)/o2^2);
       end
   end
 end 

Disciplined convex programming error:
Illegal operation: pow_p( {convex}, {-1} )

出错 cvx/inv_pos (line 5)
y = pow_cvx( x, -1, ‘pow_p’ );

However, there is an error in the above lines. Why is it wrong? What should I change?

Clearly you are not following CVX’s rules.

Have you proven that your optimization problem is convex? It looks rather dubious to me.