How to refresh matrix on every iteration

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개)

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

질문:

2014년 12월 20일

편집:

2014년 12월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by