I need a for loop that can generate different combinations of power allocation (P1 & P2) for two users (user1 & user2) in a cell and compute the sum rate of each combination
2 次查看(过去 30 天)
显示 更早的评论
The details are below: a loop for different combinations of Power to be allocated to user1 and user2. and compute Rsum = p1 +p2 for each combination. The maximum power for allocation is 10 W (Pmax = 10). The loop should allocate more power to near user and less power to far user. This is to satisfy power constraints. Forexample
Pmax = 10 W
P = [1 2 3 4 5 6 7 8 9 10]
% distances of near users (dn) and far users (df) within a cel radius of 100m.
dn1 = 10; df1 = 90;
dn2 = 20; df2 = 80;
dn3 = 30; df3 = 70;
dn4 = 40; df4 = 60;
dn5 = 50; df5 = 50;
% different combinations of power allocation (PA) for different users above
a1 = 9; a2 = 1; % PA allocation 1
b1 = 8; b2 = 2; % PA allocation 2
c1 = 7; c2 = 3; % PA allocation 3
d1 = 6; d2 = 4; % PA allocation 4
e1 = 5; e2 = 5; % PA allocation 5
Rsum = dn1+a1+df1+a2
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!