function [R_c] = Update_R_c(channel, beam, alpha_common, common_beta, Group, delt, Com_noise_power)
K = length(Group);
P_c = beam( : , : , 1); %分配给公共部分的功率。
g_common = [];
noise_power = 0;
for i = 1 : K
[n,~] = size(channel(: , : , i));
A_c_i = channel(: , :, i) * P_c;
for j = 1 : K
for p = 1 : n
for l = 1 : n
Com_noise_power( p, l, j) = square_pos(norm(channel( p, :, i) * beam( :, l, j + 1), 'fro'));
end
end
noise_power = noise_power + common_beta{i}' * Com_noise_power( :, :, j) * common_beta{i};
end
g_common_i = real(log2(det(eye(n) + alpha_common{i}))) - real(trace(alpha_common{i})) + ...
trace((eye(n) + real(alpha_common{i})) * (2 * real(common_beta{i}' * A_c_i) -...
(noise_power_i + real(common_beta{i}' * delt * common_beta{i}))));
g_common = [g_common g_common_i];
end
R_c = min(g_common);
end
错误使用 &
NaN 值无法转换为逻辑值。
出错 cvx/cvx_vexity (第 38 行)
v( any( imag( x.basis_ ), 1 ) & v ) = NaN;
出错 * (第 296 行)
v = cvx_vexity( z );
出错 Update_R_c (第 27 行)
noise_power = noise_power + common_beta{i}’ * Com_noise_power( :, :, j) * common_beta{i};