For loop over writes output with strcmp
이전 댓글 표시
Hello,
I have the following code. The probles is that for every for loop, there are mulitple occurences of firsy in second. So, after every run, L is over written. I would like the indexesfor of anything that matches to be added below the previous output of L, not overwritten. I tried a lot of things but couldn't figure this out. Please help.
for a=1:r
first=test1(a,1);
second=reactionType(:,3);
L=find(strcmp(second,first));
end
댓글 수: 2
Michael Madelaire
2018년 12월 31일
Would be real nice if you told what
test1
reationType
is...
Ishita Trivedi
2018년 12월 31일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!