could anyone tell me how to store the result of each iteration in an array for the following code

2 ビュー (過去 30 日間)
code:
t=4;
r=6;
for it=1:4
output(t,r)=overall_throughput;
output_it(t,r,it)=output(t,r);
end

採用された回答

Walter Roberson
Walter Roberson 2018 年 4 月 10 日
t=4;
r=6;
for it=1:4
output(t,r)=overall_throughput;
output_it(t,r,it)=output(t,r);
all_output{it} = output;
all_output_it{it} = output_it;
end
Now a complete record of the results of the iterations is stored in all_output and all_output_it
  5 件のコメント
Prabha Kumaresan
Prabha Kumaresan 2018 年 4 月 12 日
I have modified the line to
throughput{u,v} =(C.*log2(1+(((A{u,v}).*(B{u,v})/(w+sum(B(1:u-1,v)).*A{u,v})))))
but still i am getting error. Cell contents reference from a non-cell array object.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by