Info
This question is closed. Reopen it to edit or answer.
Could anyone help me to solve the following issue.
    1 view (last 30 days)
  
       Show older comments
    
I want to calculate the throughput using the following expression
for v =1:size(B,2)
  for u =1:size(A,1)
    throughput(u,v) =(Bmax.*log2(1+(((A(u,v)).*(B(u,v))/(noise+sum(B(1:u-1,v)).*A(u,v))))))
  end
  end
where
Bmax=3000;
noise=10;
and A and B gets generated by the code and the result for A and B was
A=[0         0         0         0    0.0447         0
   0         0         0         0    0.0294         0]
B=[0         0         0         0    0.2428         0
   0         0         0         0    0.4424         0]
A=[0         0    1.9728         0         0         0
   0         0    0.0000         0         0         0]
B=[0         0    0.1971         0         0         0
   0         0    0.2703         0         0         0]
A=[0.2373    0.2169         0    0.1979         0    0.2098
   0.0174    0.0186         0    0.0214         0    0.0249]
B=[0.2160    0.7904         0    0.4386         0    0.8620
   0.3774    0.9493         0    0.8335         0    0.9899]
When the code executes the throughput was calculated with respect to last array of A and B.
But i want to calculate the throughput with respect to all arrays of A and B one by one using the for loop throughput expression.Could anyone help me to fix the issue.
2 Comments
Answers (1)
  Walter Roberson
      
      
 on 12 Apr 2018
        Use the same technique I showed you in https://www.mathworks.com/matlabcentral/answers/393815-could-anyone-tell-me-how-to-store-the-result-of-each-iteration-in-an-array-for-the-following-code#answer_314290 and https://www.mathworks.com/matlabcentral/answers/393813-could-anyone-tell-me-how-to-get-the-iterations-with-different-values-in-the-code-where-rng-is-used#answer_314286
"Store everything you might need later. You can always go back afterwards and clean up the parts you did not turn out to need.
Rule of programming: get it to work first, optimize afterwards."
0 Comments
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

