How to perform "n" iterations and average those n values to single?
1 次查看(过去 30 天)
显示 更早的评论
Hi! Need an Urgent help. Here is the code i have written for throughput calculation. I want to average out my resulting values for n iterations to plot average value of throughput. Help me thanks in advance
Throughput_Per_Cell_Without_Sharing_A = zeros((N_A),2);
JJ = 0;
for i = 1 : size(Alocated_RB_User_A,1)
if sum(Alocated_RB_User_A(i,:)) ~= 0
for j = 1 : size(Selected_User_A,1)
for k = 1 : size(Selected_User_A,3)
if i == Selected_User_A(j,2,k)
JJ = JJ + 1;
Throughput_Per_Cell_Without_Sharing_A(JJ,1) = Throughput_Per_Cell_Without_Sharing_A(JJ,1) + 1;
Throughput_Per_Cell_Without_Sharing_A(JJ,2) = Throughput_Per_Cell_Without_Sharing_A(JJ,2)...
+ (Selected_User_A(j,4,k) * Selected_User_A(j,5,k));
end
end
end
end
end
x = 0;
y = 0;
for i = 1 : size(Throughput_Per_Cell_Without_Sharing_A,1)
if Throughput_Per_Cell_Without_Sharing_A(i,1) ~= 0
x = x + Throughput_Per_Cell_Without_Sharing_A(i,1);
y = y + Throughput_Per_Cell_Without_Sharing_A(i,2);
Temp_A(i,:) = [x y];
end
The 1st column of "Throughput_Per_Cell_Without_Sharing_A" is user index where 2nd is throughput value, also am reshaping the above matrix and renamed as "Temp_A" . I need 10 values of throughput against each user and take average of those 10 vales end
6 个评论
Walter Roberson
2018-11-11
We are spelling out our frustration at people claiming that their particular circumstances are "urgent".
Image Analyst
2018-11-11
Since it's been almost a month, I guess the urgent deadline has passed and this no longer needs to be solved.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!