Could anyone help me to solve the following issue.

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

Similar question is answered.......follow the same here too.
I tried but i am getting the error as the code executes
Bmax=3000;
noise=10;
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]
N = length(A) ;
throughput = cell(N,1) ;
for k =1:N
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
end
with respect to the code i cannot mention A{1},B{1},A{2},B{2},C{3},C{3} as A and B array are generated by the code.could you please help me to solve it.

This question is closed.

Asked:

on 12 Apr 2018

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!