Based on the error, it appears that h(i) must be complex input data, not real. The solution might be to rearrange (h(i)'*h(i)), then multiply by the rest of the expression.
BTW, your program keeps overwriting gamma_E Therefore,when used later in your program, its value will correspond only to the last time through the for loops, i.e., i = num_targets, d = D
So presumably you will need to change something in the program so that it does what you want.
But now I have encountered a new problem. I tried big M but couldn’t solve it. I hope you can take a look
variable P(num_targets,D) nonnegative; % power allocation matrix
variable A(num_targets,D) binary; % binary allocation matrix
% Objective
obj = 0;
for i = 1:num_targets
for d = 1:D
%gamma_E = (h(i)' * sum_square_abs(F(i,d)') * h(i)) / N_0;
gamma_E = (h(i)' * F(i,d) * conj(F(i,d)') * h(i)) / N_0; % effective channel gain
obj = obj + A(i,d) * B * log(1 + P(i,d) * gamma_E);
end
end
then, the error infor is like that
Disciplined convex programming error:
Cannot perform the operation: {real affine} .* {concave}