Disciplined convex programming error: Illegal operation: {log-convex} - {log-convex}

cvx_begin quiet
variable s2;
variable q(M,N,2);
variable d(M,K,N);
% expression h4(M,K,N);
% expression A(M,K,N);
% expression B(M,K,N);
expression q_j_2(1,2);
expression q_j_3(1,2);
expression q_2(1,2);
expression q_3(1,2);
expression q_4(1,2);
expression A1(M,K,N);
expression Rlbkm(1,K,N);
expression juli2(M,K,N);
expression h5(M,K,N);
expression h6(M,K,N);
expression h7(M,K,N);
expression h8(M,K,N);
expression r4(M,K,N);
for n=1:N
for k=1:K
for m=1:M
% h4(m,k,n)=h2(m,k,n)inv_pos(juli(m,k,n));
% A(m,k,n)=h4(m,k,n)log2einv_pos(h3(1,k,n)+o21);
% B(m,k,n)=log(h3(1,k,n)+o21)/log(2);
q_j_2(1,1)=q_j(m,n,1)-W(k,1);
q_j_2(1,2)=q_j(m,n,2)-W(k,2);
q_2(1,1)=q(m,n,1)-W(k,1);
q_2(1,2)=q(m,n,2)-W(k,2);
A1(m,k,n)=-A(m,k,n)
(square_pos(norm(q_2))-square_pos(norm(q_j_2)));
% juli2(m,k,n)=H^2+d(m,k,n);
% h5(m,k,n)=p0-10*log(juli2(m,k,n))/log(10);
% h6(m,k,n)=p_j(m,n)+h5(m,k,n);
% h7(m,k,n)=10^(h6(m,k,n)/10);
end
end
end
Rlbkm=sum(A1)+B;

``````   for n=1:N
for k=1:K
for m=1:M
juli2(m,k,n)=H^2+d(m,k,n);
h5(m,k,n)=p0-10*log(juli2(m,k,n))/log(10);
h6(m,k,n)=p_j(m,n)+h5(m,k,n);
h7(m,k,n)=10^(h6(m,k,n)/10);
end
end
end
for n=1:N
for k=1:K
for m=1:M
r4(m,k,n)=l_j(m,k,n)*(Rlbkm(1,k,n)-log(h7(1,k,n)+h7(2,k,n)-h7(m,k,n)+o21)/log(2));
end
end
end
r5=N1*sum(sum(r4,3),1);
``````

maximize(s2)

subject to

for k=1:K
r5(1,k,1)>=s2;
end
for n=1:N
for k=1:K
for m=1:M
q_j_2(1,1)=q_j(m,n,1)-W(k,1);
q_j_2(1,2)=q_j(m,n,2)-W(k,2);
q_2(1,1)=q(m,n,1)-q_j(m,n,1);
q_2(1,2)=q(m,n,2)-q_j(m,n,2);
d(m,k,n) <=square_pos(norm(q_j_2))+2q_j_2q_2’;
end
end
end

``````    for m=1:M
for n=1:N-1
q_3(1,1)=q(m,n,1);
q_3(1,2)=q(m,n,2);
q_4(1,1)=q(m,n+1,1);
q_4(1,2)=q(m,n+1,2);
square_pos(norm(q_4-q_3))<=Smax^2;
end
end

for m=1:M
q(m,1,1)==q(m,N,1);
q(m,1,2)==q(m,N,2);
end
for n=1:N
q_3(1,1)=q(1,n,1);
q_3(1,2)=q(1,n,2);
q_4(1,1)=q(2,n,1);
q_4(1,2)=q(2,n,2);
q_j_2(1,1)=q_j(1,n,1);
q_j_2(1,2)=q_j(1,n,2);
q_j_3(1,1)=q_j(2,n,1);
q_j_3(1,2)=q_j(2,n,2);
dmin^2<= square_pos(norm(q_j_2-q_j_3))+2*(q_j_2-q_j_3)*((q_3-q_4)-(q_j_2-q_j_3))';
end
cvx_end
``````