Please help me to find the problem of my code.Thank you!
M=16;
K=6;
H=(randn(M,K)+1i*randn(M,K))/sqrt(2);
sigma_2=0.01;
P0=1;
gamma0=10;
cvx_begin
variable W(M,K) complex
minimize(square_pos(norm(W,'fro')))
subject to
for k=1:K
for j=1:K
num = 0;
if (j ~= k)
num = num+(square_pos(abs(H(:,j)'*W(:,j))));
end
end
square_pos(abs(H(:,k)'*W(:,k)))-(num*gamma0)>=gamma0*sigma_2;
end
cvx_end
错误使用 + (line 83)
Disciplined convex programming error:
Illegal operation: {convex} - {convex}
出错 - (line 21)
z = plus( x, y, true, cheat );
出错 Untitled4 (line 20)
square_pos(abs(H(:,k)'W(:,k)))-(numgamma0)>=gamma0*sigma_2;