How to refresh matrix on every iteration

3 views (last 30 days)
Mekala balaji
Mekala balaji on 20 Dec 2014
Edited: Image Analyst on 20 Dec 2014
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

Answers (0)

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!