How to perform "n" iterations and average those n values to single?
Show older comments
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 Comments
ammara khurshid
on 11 Nov 2018
Walter Roberson
on 11 Nov 2018
I was in the middle of a medical appointment when you posted the question, getting repairs done to my back. If it truly was an "Urgent" question, then I would have had to cut the medical appointment short to work on the question.
That is what "Urgent" means in English: "Urgent" means that the matter is so important that the only more important thing you could be doing is directly saving a life, such as running out of a burning building.
TADA
on 11 Nov 2018
With great respect sir, I think this is just a figure of speech not to be taken so literally. People sometimes need to spell out their frustration. That may very well be the wrong choice of words, still I think that writing that it's urgent is way better than swearing Mathworks or something of that sort.
Walter Roberson
on 11 Nov 2018
We are spelling out our frustration at people claiming that their particular circumstances are "urgent".
Image Analyst
on 11 Nov 2018
Since it's been almost a month, I guess the urgent deadline has passed and this no longer needs to be solved.
Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!