How to refresh matrix on every iteration
3 views (last 30 days)
Show older comments
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
0 Comments
Answers (0)
See Also
Categories
Find more on Multidimensional Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!