cvx_begin
variable beam(K + 1, K) complex;
variable r_c(1, K);
variable R_p(1, K);
common_rate = sum(Group .* r_c);
rate = 0;
for i = 1 : K
upper_limit = R_p(i) + Group(i) .* r_c(i) - D_min(i);
rate = rate + (((theta * (1 - exp(- upper_limit * theta))) .* (upper_limit >= 0)) + upper_limit .* (upper_limit <= 0)) + D_min(i);
end
maximize(rate)
subject to
for i = 1 : K
g_private_i = Update_g_private_k(channel, beam, private_beta, alpha_private, Group, i, delt);
R_p(i) <= g_private_i;
0 <= R_p(i);
[R_c, ~] = Update_g_common_k(channel, beam, alpha_common, common_beta, Group, i, delt);
end
for j = 1 : K
0 <= r_c(j);
end
common_rate <= R_c;
% 功率约束
square_pos(norm(beam, 'fro')) <= P_max;
cvx_end
报错原因:
Incorrect number or types of inputs or outputs for function vec.
出错 cvx/sparsify>replcols (第 142 行)
cvx___.readonly( ndxs ) = vec( cvx_readlevel( bN ) );
出错 cvx/sparsify (第 61 行)
[ x, forms, repls ] = replcols( x, tt, ‘full’, forms, repls, isobj );
出错 cvx/exp (第 68 行)
xt = sparsify( xt, ‘exponential’ );
出错 Cvx_solver (第 49 行)
rate = rate + (((theta * (1 - exp(- upper_limit * theta))) .* (upper_limit >= 0)) + upper_limit .* (upper_limit <= 0)) + D_min(i);