Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Could anyone help me to solve the following issue.

조회 수: 1 (최근 30일)
Prabha Kumaresan
Prabha Kumaresan 2018년 4월 12일
마감: MATLAB Answer Bot 2021년 8월 20일
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
KSSV
KSSV 2018년 4월 12일
Similar question is answered.......follow the same here too.
Prabha Kumaresan
Prabha Kumaresan 2018년 4월 12일
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.

답변 (1개)

Walter Roberson
Walter Roberson 2018년 4월 12일
"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."

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by