필터 지우기
필터 지우기

how to save iterations?

조회 수: 2 (최근 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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by