How to refresh matrix on every iteration
Mostrar comentarios más antiguos
Hello,
I am facing a problem in refreshing values on every iteration: I have the attached code, I want to refresh the values stored in the below array matrix on every change of p values (in other words, assign empty before every 'p' iteration). Currently if (isempty(HTDM)~=1) it is storing previous values which I infact shoud be no values be stored in the below array(s). Please help me, it would great help for me:
In third iteration (when p=3), the count shoud be zero, and data stored in below array(s) should be zero.
EndHist_CurHTD(:,m)=TrainsetAllEnd(:,j);
EndHist_PreHTD(:,m)=TrainsetAllEnd(:,j-1);
IndexHistCurHTD(m,1)=j;
IndexHistPreHTD(m,1)=j-1;
Count=nnz(IndexHistPreHTD);
Thanks again in advance, Pl help
Respuestas (0)
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!