필터 지우기
필터 지우기

How to solve logrithmic constraint in convex program?

조회 수: 8 (최근 30일)
NEELU GUPTA
NEELU GUPTA 2018년 11월 22일
%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개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by