adding a matrix to other during iteration

1 回表示 (過去 30 日間)
M@lik Ali
M@lik Ali 2013 年 2 月 5 日
Hi all i have a matrix of
Columns 1 through 6
0.0104 0 0 0 0 0.1250
0.1771 0.1250 0.1250 0.1250 0.1042 0.1771
0.0313 0 0 0 0.0313 0.0521
0.0104 0 0 0 0.0313 0.1250
0.0208 0 0 0 0.0729 0.2188
Columns 7 through 12
0.0208 0.0208 0 0.0833 0.0521 0
0.1667 0.0938 0 0.0521 0.0417 0
0.0729 0.0521 0 0.0417 0.0208 0
0.0521 0 0 0.0417 0.0313 0
0.2396 0.1042 0 0.1354 0.1458 0.0104
Columns 13 through 16
0 0.0104 0.0625 0
0 0.1354 0.0521 0.0104
0 0.0208 0.0208 0
0 0 0 0
0 0.0833 0.0521 0
i have this matrix on each iteration and total i have 1000 iteration.
i want to have one full matrix of all the iterations index wise. if the name of my above matrix is totbins then what should i write at every iteration to have one all matrix in one matrix.
Thanks in Advance

採用された回答

Walter Roberson
Walter Roberson 2013 年 2 月 5 日
numiterations = 1000;
[row, col] = size(totbins);
all_one_matrix = zeros(row, col, numiterations);
for K = 1 : numiterations
totbins = ... some expression ...
all_one_matrix(:, :, K) = totbins;
end
  1 件のコメント
M@lik Ali
M@lik Ali 2013 年 2 月 5 日
Thanks It working fine.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by