how to save iterations?

4 ビュー (過去 30 日間)
Andrea Finocchiaro
Andrea Finocchiaro 2015 年 10 月 20 日
コメント済み: Torsten 2015 年 10 月 21 日
Hi guys, I am running a cycle of this type:
for i=1:190 cm1=cov(rend(i:180+1-i,:)); end
The problem is that Matlab is showing me just the LAST result of the cycle(that is a matrix) but i want to see and to save save all the results. Thanks

回答 (1 件)

Torsten
Torsten 2015 年 10 月 20 日
Instead of cm1, use cm1(i).
Best wishes
Torsten.
  2 件のコメント
Andrea Finocchiaro
Andrea Finocchiaro 2015 年 10 月 20 日
Thank you, I tried but this error happens:
In an assignment A(:) = B, the number of elements in A and B must be the same.
I don'understand why.
Torsten
Torsten 2015 年 10 月 21 日
for i=1:190
cm1=cov(rend(i:180+1-i,:));
cm_mat(i,:,:) = cm1(:,:);
end
assuming that all covariance matrices are of the same size.
Best wishes
Torsten.

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

カテゴリ

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