Disciplined convex programming error: Cannot perform the operation: {real affine} ./ {convex} What should I do about it

When I run my code, the following error appears. Hope to get your help.

错误使用 .* (第 173 行)
Disciplined convex programming error:
Cannot perform the operation: {real affine} ./ {convex}

出错 ./ (第 19 行)
z = times( x, y, ‘./’ );

出错 * (第 36 行)
z = feval( oper, x, y );

出错 / (第 15 行)
z = mtimes( x, y, ‘rdivide’ );

出错 Generate_beamforming_P (第 324 行)
- (abs(h_k(k)’ * p_k_i(k))^2 )* rho(k) /((rho_i(k)^2));

My main relevant code is as follows:
for k = 1:K
1 + rho(k) - 2^gamma_var(k)>= 0;

         Psi_1(k) = 2 * real(p_k_i(k)' * h_k(k) * h_k(k)' * p_k(k)) * inv_pos(rho_i(k)) ...
                  - (abs(h_k(k)' * p_k_i(k))^2 )* rho(k) /((rho_i(k)^2));
        % (rho_i(k)^2) 
       
        w_temp4 = 0;
        for i = 1:K
            if i ~= k
                w_temp4 = w_temp4 + pow_abs(h_k(k,:) * p_k(:, i), 2);
            end
        end
    
        w_temp4 + n - Psi_1(k) <= 0;
    end

You haven’t shown us what are the variables, CVX expressions, vs. input data etc.

But obviously you violated CVX’s rules. And a lot more than just what triggered that error, because CVX stops when it encounters the first error.

Your first task is to prove that your optimization problem is convex. I can’t say for sure your problem can’t be reformulated for CVX, but it seems quite possibly the case.

Thank you for your reply, I will rethink my optimization question again。