how to save iterations?

4 visualizaciones (últimos 30 días)
Andrea Finocchiaro
Andrea Finocchiaro el 20 de Oct. de 2015
Comentada: Torsten el 21 de Oct. de 2015
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

Respuestas (1)

Torsten
Torsten el 20 de Oct. de 2015
Instead of cm1, use cm1(i).
Best wishes
Torsten.
  2 comentarios
Andrea Finocchiaro
Andrea Finocchiaro el 20 de Oct. de 2015
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 el 21 de Oct. de 2015
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.

Iniciar sesión para comentar.

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by