Store and use iterations from for loop

i=1;
finish = size(A,3);
for i = 1:1:finish
RMSE(A(:,:,i),Exp);
end
I have a 3D array (database) called A. This array consists of rows x columns x pages. Each page represent a different set of rows x columns. I want to calculate RMSE for each "page" of A with respect to the experimental results. I want to somehow store all the iterations from the for loop in a separate array (call it M), so then I can find the minimum of M and use it elsewhere. Any ideas?

1 件のコメント

dpb
dpb 2016 年 12 月 17 日
Dimensions of Exp?

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

回答 (1 件)

Jan
Jan 2016 年 12 月 17 日
編集済み: Jan 2016 年 12 月 17 日

0 投票

Perhaps like this?
finish = size(A,3);
result = zeros(1, finish);
for i = 1:finish
result(i) = RMSE(A(:,:,i), Exp);
end
Or is the "RMSE" part the problem?

カテゴリ

ヘルプ センター および File ExchangeChemistry についてさらに検索

質問済み:

2016 年 12 月 17 日

編集済み:

Jan
2016 年 12 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by