How to solve logrithmic constraint in convex program?
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
%convex optimization for optimizing allocated powers (P1 and P2)
cvx_begin quiet
cvx_solver mosek
variable P(2,1) %optimization variables
R_min = 1; % 1 bits/Hz (minimum transmission rate)
maximize(Mn-mu_n*(1+exp(-an*(gnx*(P(1)+P(2))-bn))))
subject to
R1 = log2(1+(P(1)*hix)/(P(2)*hix)+Ni);
R2 = log2(1+(P(2)*hjx)/Nj);
R3 = log2(1+(P(1)*hjx)/((P(2,1)*hjx)+Nj));
R1 >= R_min;
R2 >= R_min;
R3 >= R1+R2;
qmx*P(1,1)+P(2,1) <= Gamma_m;
mu_n >= 0;
cvx_end
P
Getting error like this
Error using .* (line 173)
Disciplined convex programming error:
Cannot perform the operation: {real affine} ./ {real affine}
Error in ./ (line 19)
z = times( x, y, './' );
Error in * (line 36)
z = feval( oper, x, y );
Error in / (line 15)
z = mtimes( x, y, 'rdivide' );
Error in nov22 (line 41)
R1 = log2(1+(P(1)*hix)/(P(2)*hix)+Ni);
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!