# Need help. Cannot perform the operation: {positive constant} ./ {convex}

``````cvx_begin
variable scheduling(K,N)
variable Q1(2,N)
variable Slack_1(K,N)
variable Slack_2(K,N)
variable Slack_3(K,N)
variable t_traj_scheduling
expressions Snr(K,N) Distant(K,N) R_traj_scheduling_lb(K,N) X_lb(K,N) Y_lb(K,N) E_lb(K,N) Slack_1_lb(K,N) Slack_2_lb(K,N) Z(K,1)
maximize ( t_traj_scheduling )
for k=1:K
Snr(k,:) = pow_pos((H^2+ pow_pos(norms( Q1(:,:)- BD_locat(:,k)*ones(1, N),2),2)),2) ./ (D.*B(k,:).*P_max);  %K*N
Distant(k,:) = H^2+ pow_pos(norms( Q1(:,:)- BD_locat(:,k)*ones(1, N),2),2);
Distant_lb(k,:) = H^2+ norms( Q1_r(:,:)- BD_locat(:,k)*ones(1, N),2).^2;

Slack_1(k,:) = Band.*(log(1 + (D.*B(k,:).*P_max)./ pow_pos((H^2+pow_pos(norms( **Q1(:,:)**- BD_locat(:,k)*ones(1, N),2 ),2)),2))/log(2));%K*N

end
``````

Disciplined convex programming error:
Cannot perform the operation: {positive constant} ./ {convex}

error ./ (line 19)
z = times( x, y, ‘./’ );

error mainl_final (line 282)
` Slack_1(k,:) = Band.*(log(1 + (D.*B(k,:).*P_max)./ pow_pos((H^2+pow_pos(norms( Q1(:,:)- BD_locat(:,k)*ones(1, N),2 ),2)),2))/log(2));%K*N`

how to deal this problem？ help

I believe `Slack_1` is neither convex nor concave, and therefore can’t be used in CVX.

But what do you do with `Slack_1`? The portion of the program in your post does not use it. If it is used in constraints, show us the constraints. Maybe you can multiply through the denominator for use in the constraints, and never explicitly form `Slack_1`.

BTW, the thread title has been edited because there is no need for theatrics. In the vast majority of threads, the poster needs help.

Thanks!!!
another problem:

``````		cvx_begin
expressions Snr_B(K,N) rate_B(K,N)
variable backscatter(K,N)
variable t_backscatter
maximize ( t_backscatter   )
subject to
for k=1:K
Snr_B(k,:) = (D.*backscatter(k,:).*P_max) ./ (( H^2+ norms( Q1_r(:,:)- BD_locat(:,k)*ones(1, N),2).^2 ).^2);
rate_B(k,:) =  log(1 + Snr_B(k,:))/log(2);
end
sum(Band.*assignment1.*rate_B, 2) ./ R_min >= t_backscatter  ;
0.8*sum((1-backscatter).*channel_0.*(ones(K,1)*(P_max*ones(1,N))), 2) >= Emin;
0 <= backscatter;
backscatter <= 1;
0 <= t_backscatter;
cvx_end
``````

the result "t_backscatter " is Nan，how to deal ？
t_backscatter= NaN